This is a kind of dumb error google webmaster tools is giving me:
- Using drupal 6.2
- I have my site added to the google webmaster's tool without the www, that is: example.com
- Under my "Set Preferred URL" setting under "Tools", I have it so that Both www.example.com and example.com work
- when I add my sitemap, the resulting URL is: http://example.com/sitemap.xml
- All my sitemap links have the www. preceding everything
Google webmaster tools is not getting the sitemap, thus not indexing anything because of the following error:
Paths don't match
We've detected that you submitted your Sitemap using a URL path that doesn't include the www prefix (for instance, http://example.com/sitemap.xml). However, the URLs listed inside your Sitemap do use the www prefix (for instance, http://www.example.com/myfile.htm).
Is there any way I can fix this from the Sitemap module in my drupal site? I believe I have this same situation with sitemaps in drupal-5.7 sites and I didn't run into this problem there. Could this possibly be a bug in the dev 6 version of XML sitemap?
Thanks
Comments
Comment #1
darren ohWhat URL are you using on the Search Engines page?
Comment #2
faunapolis commentedThis is the site:
http://opticalillusionGames[dot]com
When I added it to the Google Webmaster's page, I used:
http://opticalillusionGames[dot]com
When I added the sitemap.xml in the webmasters tools, it is only added as:
http://opticalillusionGames[dot]com/sitemap.xml
But, in the settings for the webmasters tools I have the following: Tools > Set Preferred URL
- Both www. example.com and example.com to work
Thanks for the module and its prompt port to drupal-6
Comment #3
faunapolis commentedOk, I think I kind of fixed it; sorry about the moving target.
I went into the site and logged in as admin into the URL without the www, that is opticalillusiongames[dot]com, and then generated the sitemap again. Now, all the items in the sitemap were generated without the trailing www. I think that should fix my conflict at the google webmaster's tools. But still, it is kind of tricky I think.
Comment #4
darren ohThis will be fixed when the 5.x-2.x code is ported to 6.x.
Comment #5
avpadernoI am changing the status to fixed to make the report close automatically after 2 weeks.
Comment #7
mikew_is commentedHi,
I am experiencing the same problem with google webmaster tools, however my problem is a bit more sporadict. Most time webmaster tools is seeing my sitemap with no problems, but I find when i am edditing my site or adding new pages, it sometimes give me the exact same error as above.
Comment #8
Manamarak commentedOne more here, this problem has reared its head for me too.
Comment #9
avpadernoComment #10
dave reidWhen using the 7.x-2.x or 6.x-2.x versions you can set your 'Default base URL' variable to the preferred domain on your admin/settings/xmlsitemap/settings page. If using any other versions, this is not possible to fix without adding a line to your site's settings.php file like this:
$GLOBALS['base_url'] = 'http://www.mysite.com';Comment #11
xl_cheese commentedI'm getting this issue too. When I first set it up all worked fine. I just noticed the other day it's giving me this error. I've tried changing the settings, but I still get this error. It's timely to fix because you have to wait an entire day for google to reprocess the sitemap.