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

Google Webmaster Tools says that my sitemap is in a wrong format. I don't see my mistake, I think I followed every guideline provided by Google.

Can someone help me?

Inline sitemap below, but in case it comes from meta data (e.g. headers): orignial is http://www.vocalcontraste.fr/sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>http://www.vocalcontraste.fr/</loc>
  </url>

  <url>
    <loc>http://www.vocalcontraste.fr/presentation/</loc>
    <lastmod>2012-01-30T21:49:06+01:00</lastmod>
  </url>

  <url>
    <loc>http://www.vocalcontraste.fr/les-concerts/</loc>
    <lastmod>2012-12-13T21:55:00+01:00</lastmod>
  </url>

  <url>
    <loc>http://www.vocalcontraste.fr/ecoutez-contraste/</loc>
    <lastmod>2012-07-13T18:19:45+01:00</lastmod>
  </url>

  <url>
    <loc>http://www.vocalcontraste.fr/repertoire/</loc>
    <lastmod>2012-07-13T17:30:14+01:00</lastmod>
  </url>

  <url>
    <loc>http://www.vocalcontraste.fr/la-presse/</loc>
    <lastmod>2012-07-11T08:17:48+01:00</lastmod>
  </url>

  <url>
    <loc>http://www.vocalcontraste.fr/recrutement/</loc>
    <lastmod>2012-02-01T22:22:03+01:00</lastmod>
  </url>

  <url>
    <loc>http://www.vocalcontraste.fr/nos-partenaires/</loc>
    <lastmod>2012-07-11T07:43:31+01:00</lastmod>
  </url>

  <url>
    <loc>http://www.vocalcontraste.fr/contactez-nous/</loc>
    <lastmod>2012-02-02T19:01:32+01:00</lastmod>
  </url>

</urlset>
share|improve this question
    
Your sitemap.xml file is returning a mime-type of text/xml rather than the preferred application/xml. –  w3d Dec 14 '12 at 16:29
    
ok, now it does return application/xml but it makes no difference :-( thanks anyway –  cadrian Dec 16 '12 at 2:53
add comment

2 Answers 2

Try to use the following for the 2 first tags of your document :

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

By the way, don't forget that two more tags would be welcome inside your <url> tags, like this:

<changefreq>weekly</changefreq>
<priority>0.6</priority>

See more here: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=183668

share|improve this answer
    
I already tried those. Doesn't make any difference. –  cadrian Dec 16 '12 at 2:46
add comment
up vote 2 down vote accepted

OK, I found the problem.

My site uses SPIP3 which has a bug when the sitemap is GET by googlebot

see http://forum.spip.net/fr_245670.html?tri_recherche=date

Just fix config/ecran_securite.php by adding an @ before array_shift() somewhere near to the end of file.

(edit) I forgot: thanks to http://web-sniffer.net/ too. Just set the user agent to "Googlebot" :-)

share|improve this answer
2  
Thanks for the feedback. So, this "bug" results in a PHP E_WARNING being output which corrupts the XML file! –  w3d Dec 16 '12 at 11:47
add comment

protected by John Conde Jun 30 '13 at 16:14

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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