hsntngr
7 months ago
22
12
Servers

Browsers displays sitemap as plain text

Posted 7 months ago by hsntngr

I'm trying to display my sitemaps. Browsers display my sitemap index as xml but treat post sitemaps as plain text.

I tried to override content type with below configuration but it didn't help.

location ~ \.xml$ {
    proxy_hide_header Content-Type;
    add_header Content-Type "application/xml";
}

How do I force nginx to set content type as "application/xml" ?

sitemap index = https://gamercortex.com/sitemap.xml sitemap1 = https://www.gamercortex.com/sitemaps/sitemap-1.xml

How can I fix this ?

Please sign in or create an account to participate in this conversation.