Sitemap.xml error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hello,

I am getting this error:
Incorrect http header content-type: "text/html; charset=utf-8" (expected: "application/xml")

For the following ...
<?xml version="1.0" encoding="UTF-8"? "application/xml")>  
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
  <loc>http://www.parts.troyonlinesales.com/en/changecurrency/1?returnurl=%2fen%2f</loc>
</url>
<url>
  <loc>http://www.parts.troyonlinesales.com/en/changecurrency/4?returnurl=%2fen%2f</loc>
</url>
<url>
  <loc>http://www.parts.troyonlinesales.com/en/changecurrency/6?returnurl=%2fen%2f</loc>
</url>
<url>
  .... etc

Any ideas??
5 years ago
Where exactly are getting this error?

Try https://www.xml-sitemaps.com/validate-xml-sitemap.html. There no issues found for our demo site

P.S. Have you customized it? It doesn't contain links such as "changecurrency" by default
5 years ago
Hello and thank you for the reply.  

Using the site you recommended and others, including Google Webmaster Tools, I get an error "Incorrect http header content-type: "text/html" (expected: "application/xml")".

Also, I get an error from my robots.txt even though it's pathed right.

And lastly, when I run a website analyser tool they all say that on my home page I don't have headers (ie:<h1>), but when I look using F12 on Chrome I can see them.

Thanks for any advice that you may have,
Dave
4 years ago
Hi Guys,

I am getting the exact issue here as well.

When I submit a sitemap to search console it sees the sitemap as HTML format.

When I test it on https://www.xml-sitemaps.com/validate-xml-sitemap.html I get the error "Incorrect http header content-type: "text/html; charset=utf-8" (expected: "application/xml")"  See screenshot: https://www.screencast.com/t/ZSc7TMTmTsza

My nopcommerce 3.90 sites are experienceing an issue but the 4.10 version works perfectly. This started happening when google started using the new search console.

When I comment the sitemap out of the Web.Config file and upload the saved version of the sitemap, then it works.  This is obviously a viable solution as changes made on the site will no longer be automatically updated in the sitemap.

Does anybody have a solution to this problem.  Our clients are loosing money as they are being deranked by Google.
4 years ago
Hello!

I commented out in my webconfig  the following ...

  <!--<add name="SitemapXml" path="sitemap.xml" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />-->

Alternatlively I could have pathed the subdomain into the sitemap filename.

Hope this helps!!
Dave
4 years ago
QEDDave wrote:
Hello!

I commented out in my webconfig  the following ...

  <!--<add name="SitemapXml" path="sitemap.xml" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />-->

Alternatlively I could have pathed the subdomain into the sitemap filename.

Hope this helps!!
Dave


This is exactly what I did as well but it is only a temporary fix.  If pages get added my clients will not want to have to manually go and add them.  

Isn't there a better solution to this issue on version 3.9?
4 years ago
Did you check if the sitemap.xml path is correct? Sometimes when google points that error it is because it tries to get the sitemap and a 404 page was returned.
4 years ago
nop-world.com wrote:
Did you check if the sitemap.xml path is correct? Sometimes when google points that error it is because it tries to get the sitemap and a 404 page was returned.

The sitemap path is definitely 100% correct as it works when I follow Daves suggestion.  The problem is that when I am using the standard nop software to generate the sitemap, I get the error.  When using the nop software there is no place to specify the sitemap path.
4 years ago
I used https://www.xml-sitemaps.com/ for my site maps and all went well.
4 years ago
I found the issue.  There was a builtin user that was removed from the database.

I needed to add builtin@search_engine_record.com back into the database and assign it a Guest role.

To do so I did a clean install and copied the builtin user from the clean install database into my database that was giving the issue.

And Bob's your uncle.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.