[SOLVED] URLs in sitemap only have 1 slash (http:/example.com)

Interestingly, all URLs in my Sitemaps are somehow missing a / after the http:, here an example:

<sitemap>
  <loc>https:/www.loyall.ch/de/sitemap.xml</loc>
</sitemap>
<sitemap>
  <loc>https:/www.loyall.ch/en/sitemap.xml</loc>
</sitemap>

my base url is properly setup otherwise all links would be messed up.

baseurl = "https://www.loyall.ch"
contentdir = "content"
layoutdir = "layouts"
....

I’ve found these lines in the hugo_site_test.go which also have URLs like this <loc>http:/example.com/blog/en/sitemap.xml</loc> so I’m wondering if there might be a bug somewhere or if I’m missing something.

thanks!

You are absolutely right and a proof it isn’t smart to copy the output into expected result without checking it thoroughly first. The test is mine …

Thanks for the heads up.

https://github.com/spf13/hugo/issues/2509

1 Like

Thanks for the quick fix, I’ve just tested with your latest commit and this is fixed.