Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

We're running a lot of sites and we've started to get a lot of these errors in Webmaster Tools:

Sitemap is HTML
Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.

One of the problematic sitemaps:

<?xml version="1.0" encoding="UTF-8"?> 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
    <url> 
        <loc>http://www.same_domain.co.uk/folder/file1.shtml</loc> 
        <lastmod>2011-05-11</lastmod> 
        <changefreq>weekly</changefreq> 
        <priority>0.5</priority> 
    </url> 
    <url> 
        <loc>http://www.same_domain.co.uk/folder/file2.shtml</loc> 
        <lastmod>2011-05-11</lastmod> 
        <changefreq>weekly</changefreq> 
        <priority>0.5</priority> 
    </url> 
    <url> 
        <loc>http://www.same_domain.co.uk/folder/file3.shtml</loc> 
        <lastmod>2011-05-11</lastmod> 
        <changefreq>weekly</changefreq> 
        <priority>0.5</priority> 
    </url> 
    <url> 
        <loc>http://www.same_domain.co.uk/folder/file4.shtml</loc> 
        <lastmod>2011-05-11</lastmod> 
        <changefreq>weekly</changefreq> 
        <priority>0.5</priority> 
    </url> 
</urlset>

Why would GWTs think this is anything but XML?

(Server: IIS)


Edit:

"This document was successfully checked as well-formed XML!" -W3C Validator.


Edit:

I resubmitted two problematic sitemaps, one with no changes, and one with a couple of extra lines to ensure it's treated as XML. Ran the "Fetch as Googlebot" diagnostic tool. Both are fine now. I'm just going to re-submit all sitemaps with the "Sitemap is HTML" error

The question remains:

Why did this happen? Why did GWTs think these XML sitemaps were HTML?

share|improve this question

migrated from serverfault.com May 20 '11 at 9:23

This question came from our site for professional system and network administrators.

4 Answers 4

up vote 2 down vote accepted

Farseeker's suggestion is a good first step in troubleshooting (a text/html content-type would certainly produce this result) - Google Webmaster Tools should display a different error message if the sitemap file contains invalid XML.

Given the temporary nature of the issue, have you checked your server logs to determine whether an error page was produced on Google's prior requests?

If you are dynamically generating sitemap files, a scripting error, database timeout, or other issue could produce an HTML error page intermittently.

share|improve this answer
2  
An error message from the server would definitely send out HTML headers and is a very plausible explanation. –  John Conde May 20 '11 at 18:20

Because of the content-type header that it's spitting out. Inspect it with your favourite tool (Firebug, etc) and see what it's sending.

share|improve this answer
    
Nope. Content-Type text/xml –  Adam Lynch May 20 '11 at 9:28
    
@Adam Lynch - The correct content type is application/xml (Edit: A review of RFC 3023 leaves some ambiguity on this point, but try the application type for troubleshooting) ... Strike that - tested and GWT works with either content-type. –  danlefree May 20 '11 at 17:50

You could extend the header to include the schema stuff:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

and then validate online

If it passes that it must be Google's problem.

share|improve this answer
    
"Line 2 (<urlset>): 192 SchemaLocation: schemaLocation value = 'sitemaps.org/schemas/sitemap/0.9/sitemap.xsd'; must have even number of URI's. Line 2: 192 cvc-elt.1: Cannot find the declaration of element 'urlset'" –  Adam Lynch May 20 '11 at 9:41
    
Sorry, it was a cut and paste error. I've fixed it now. I also found out that the xmlvalidation website doesn't work properly if you're using that text box. You have to refresh the page and then paste in again to get it to revalidate properly. –  paulmorriss May 20 '11 at 9:55
    
"No errors were found" but does that mean that this will solve the errors? We have a lot of sitemaps –  Adam Lynch May 20 '11 at 9:59
    
It means it's valid, so I guess it's Google's problem. You could report it on the webmaster forums google.com/support/forum/p/Webmasters/… with all the info you've put here (right content type, extension, valid XML). –  paulmorriss May 20 '11 at 11:35
    
I've now added the schema attributes & values you've given so I'm waiting to see if the problem is gone –  Adam Lynch May 20 '11 at 11:43

Check if there are any issues from the web server side. Or if the Google IP is blocked. If you are using any log based tracking system, try to analyse the Google Bot activity. We recently had the same issue and found out that as Google changed its IP address, we were not allowing google bots to crawl through due to data mining. Issue was finally resolved.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.