|Sitemap with Subdomains|
subdomain,sitemap,paths don't match
| 6:59 pm on Apr 3, 2010 (gmt 0)|
Hi all. Have a sitemap for a brand new site that I am trying to have google webmaster tools accept.
Site is http://example.com, and I redirect www.example.com to example.com via Apache.
In GWT (Google Webmaster Tools), have added and verified example.com. Wanted to set example.com as the 'preferred domain', so also added www.example.com, veified it and then set the preferred domain for both to the non-www. No issues so far.
Now, wanted to add a sitemap. Sitemap is valid xml, and linked it from GWT using the url http://example.com/sitemap.xml.
In this sitemap, I have 20 links for now, 15 of which link to a subdomain, listings.example.com. When GWT crawled it, I got the following error:
Paths don't match
We've detected that you submitted your Sitemap using a URL path that includes the www prefix (for instance, http://www.example.com/sitemap.xml). However, the URLs listed inside your Sitemap don't use the www prefix (for instance, http://example.com/myfile.htm).
Beside this to the right, the example error link shows one of the subdomain links, [listings.example.com...] Ok, this makes sense, I do a little digging and find that I should also add and verify listings.example.com to GWT. DO this, and re-submit the sitemap, GWT crawls it, but I still get the exact same error. I have verified that the only links in the sitemap are using domains example.com and listing.example.com, both of which are verified in GWT. None of the links use www.example.com, as the error message seems to indicate.
I am at a loss. I've tried deleting the sitemap (it deletes from 'Mine' but I can't find a way to remove it from 'All', weird). I've tried resubmitting it, and triple checked that all links use only example.com or listings.example.com, but still get the same error every time.
Any ideas/advice? Thanks!
| 6:59 am on Apr 7, 2010 (gmt 0)|
have you checked the response to make sure the request url isn't being redirected to the www subdomain?
| 3:03 pm on Apr 7, 2010 (gmt 0)|
Yep, just checked and http://example.com/sitemap.xml is returning a 200 OK header response.
| 4:44 pm on Apr 7, 2010 (gmt 0)|
You need two sitemaps, one for example.com at example.com/sitemap.xml, and another for subdomain.example.com at whatever location in the filesystem will be accessed when the URL subdomain.example.com/sitemap.xml is requested -- often at the "file location" example.com/subdomain/sitemap.xml if you use a control panel to set up the subdomain.
In the case of sitemap files, the search engines will treat subdomains as entirely-separate from the main domain, and not necessarily related in any way, and not necessarily even on the same server. Therefore, each of those two sitemaps must include only URLs referring to their own hostnames.
| 5:13 pm on Apr 7, 2010 (gmt 0)|
Huh, thanks Jim. What I am trying to do is detailed here, and seems to be permitted:
I can revert to a sitemap for each subdomain, but this of course would be more work, more files to maintain, etc so the linked solution was what I was aiming for, but can't for the life of me get it to work, per my steps above.
Thanks for the help,
| 2:55 pm on Apr 9, 2010 (gmt 0)|
Just to close this issue out, it looks like the link I provided is correct, once you authenticate all of the domains you have in a single sitemap, you can validate said sitemap with Google Webmaster Tools... for some reason it kept throwing errors while I was doing it right after validating the other sites, but went back in today, a week later, and lo and behold, the sitemap is now valid and is being used by GWT.