patrickdemooij9 / SeoToolkit.Umbraco

SeoToolkit is a SEO package for Umbraco 9, 10, 11, 12 & 13. This package features most functionalities needed for your SEO needs like meta fields, sitemap, robots.txt and much more.
MIT License
37 stars 28 forks source link

My sitemap.xml is in plain text. #205

Closed WebWolves-be closed 1 year ago

WebWolves-be commented 1 year ago

Hi

For some reason my sitemap.xml is showing in plain text :

afbeelding

This is the url : https://www.chiropracticbelgium.be/sitemap.xml

I am also working with a hostname per language:

afbeelding

What could be the problem? Is the first time I am using this package and I am fairly new to Umbraco as well. Any help is much appreciated!

patrickdemooij9 commented 1 year ago

Hi @WebWolves-be This should be correct. If you look at the network tab of the sitemap request, you'll see that it returns the correct content type: image

But for whatever reason, browsers always show it like this. application/xml is the preferred content-type to be returned here though.

Ambertvu commented 1 year ago

Hmm, this isn't entirely consistent though.

I have a root node without any languages using the root domain, this shows actual XML output:

<urlset xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://localhost:44383/</loc>
<lastmod>2023-08-08</lastmod>
</url>
</urlset>

I also have a second root node, but with domains assigned to it, this shows the 'plain text but content type is application/xml' variant:

https://localhost:44383/nl/ 2023-08-08 https://localhost:44383/nl/testpage-1/ 2023-07-31 https://localhost:44383/nl/testpage-2/ 2023-07-31 https://localhost:44383/nl/testpage-3/ 2023-07-31 https://localhost:44383/nl/testpage-4/ 2023-07-31 https://localhost:44383/nl/test-page-5/ 2023-07-25 https://localhost:44383/nl/contact/ 2023-07-25 https://localhost:44383/nl/testpagina-7/ 2023-07-25 https://localhost:44383/nl/nieuwsoverzicht/ 2023-07-31