Sitemap.xml is displayed as plain text in browser

Hi guys,

I have a multilanguage website and the English version of the sitemap.xml is displayed as plain text in the browser and the links are not clickable. What do i need to change in my configuration to show the sitemap in the correct format?

Here is my default sitemap.xml.

Good question, I don’t know. Your sitemap validates properly with Yandex’s sitemap validator and the content-type header is application/xml, which seems correct too.

Do you generate the sitemap in a special way? Perhaps a setting that can cause this?

(I looked on GitHub and found your HTML source, but not the Hugo project, so can’t say anything practical.)

That is how the sitemap should look. It is a plain text XML list of URLs. Links are hypertext elements humans interact with. XML files are not for human reading.

Your sitemap is fine. :slight_smile:

Thanks, @maiki. I guess I should not worry about it then.

If you would like to style any XML you definitely can. It will not hurt how machines read it.