2

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>
  • Your sitemap.xml file is returning a mime-type of text/xml rather than the preferred application/xml. – MrWhite 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
3

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" :-)

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

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

| improve this answer | |
  • I already tried those. Doesn't make any difference. – cadrian Dec 16 '12 at 2:46

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