How to Fix Sitemap “Paths Don’t Match” Error in Google Webmaster Tools
March 29th, 2011 by
This is part of the new Q&A section. Feel free to ask anything web related in the contact form.
Ran asks:
No matter which method I choose to submit my sitemap, I can’t get it to be accepted by Google Webmaster Tools. All I get is an X symbol for the sitemap status, and for each line in it, I get the following error:
“Paths don’t match
We’ve detected that you submitted your Site-map using a URL path that includes the www prefix (for instance, http://www.example.com/sitemap.xml). However, the URLs listed inside your Site-map don’t use the www prefix (for instance, http://example.com/myfile.htm).”
I too have come across this sitemap issue in the past. At first I tried to change my preferred domain (in Google Webmaster Tools, Site Configuration – > Settings) to http://mysite.com/ but then I got the message:
“Part of the process of setting a preferred domain is to verify that you own http://mysite.com/. Please verify http://mysite.com/.”
Therefore, in order to verify the other version of my site’s URL I did the following:
- I added a new site with the same URL but without the www prefix.
- I verified the site using the HTML file I already had in the root directory (if you have problems with the verification process, ask me in the comments section).
- Once I verified the site, I tried to change the preferred domain again, but for some reason it didn’t solve the sitemap error (not sure why, it might work for you though), so I went into Site Configuration ->Change of Address and selected the new domain I just verified (the non www prefix URL).
That was it. Problem solved.
Following this solution, there were two things left to do.
First, I deleted the redundant prefix URL version I no longer use (to prevent having both www and non-www versions in my GWT account).
Secondly, I made sure that all links with www prefix in my site will redirect to the non www prefix URL.
To do this, I defined a canonical 301 URL redirection as described in this post (not too complicated).
If you found a shorter solution to that sitemap error, let me know in the comments area.

Thanks very helpful
You’re welcome Lorenzo
I am having a problem accomplishing the above fix for a WordPresss Blog. Still have the X. Paths don’t match. Says submit Site Map.
Truly would appreciate assistance..
Hi David,
Unfortunately I’m not familiar with a different solution to this problem than what I wrote here. Did you try the steps exactly as they are written here?
I can’t believe this fixed it. I was it at for a whole day trying redirecting my sitemap, renaming it, etc. I use XML Sitemap Generator for word press and it automatically generates sitemap.xml file. Holly smokes I’ve even added inline tags and html file through ftp and could not figure the hell out of it. This fixed my problem. That green check mark saved me from smashing my laptop into a wall. lol.
Listen, do you know why Google can’t see my back links even though I’ve wrote Ezine Articles, produced you tube videos, etc. It’s been a month already. Please let me know what you think.
Thank for your help…
I’m glad it worked out for you eventually. As for the back links, Google is sometimes “late” in their responses so sometimes you just need to be patient and wait more then a month. If it still doesn’t work, try the google webmaster central forum.
Thanks you. It worked for me now
To the genius that wrote this artice. I have spent several hours over four days trying to get google to see my sitemap. I have followed several pieces of advise to rectify this problem without success, until I hit on your site, hooray, thanks, I am so happy that I at last found your site with the perfect solution.
Cheers,
maureen
Thanks Maureen, I’m really glad I could help
Omer, Thanks for this. Your directions are awesome. The problem is me since I am new to this. Can you explain step 2. I am used to validating a site another way and have never done it this way. I understand why you are doing this way, just not sure how to do it. Thank you.
If you’re using WordPress, the best solution for this is installing XML Sitemaps generator Plug-In. And that’s it. The Plug-In will take care all your sitemaps.
An oh, by the way, after installing the sitemap generator plug-in, submit the sitemap the plug-in will provide you. Normally it’s http://yoursite.com/sitemap.xml.
I have verified my site in Google webmaster without prefix www. Now I want to prefix it. can you know how I can do this.