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

I have been arguing a point and would like a second opinion. The basic point of contention is as follows:

We have a site X with a sitemap index file located at:

http://www.x.co.uk/sitemap.xml

This file lists a number of site maps and the structure for the location of the site maps is:

<?xml version="1.0" encoding="UTF-8"?>
  <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <sitemap>
     <loc>http://www.x.co.uk/sitemap/date/0.xml</loc>
     <lastmod>2011-04-07</lastmod>
   </sitemap>
   <sitemap>
     <loc>http://www.x.co.uk/sitemap/date/1.xml</loc>
     <lastmod>2011-04-07</lastmod>
   </sitemap>
  </sitemapindex>

As far as i understand things search engines will except this just fine and it will not cause any issues.

However the problem being raise is this, because the actual site XML sits under a directory structure like /sitemap/date/ search engines will not include the URLS. My opinion is that this is incorrect. If anyone can clarify that would be great i have read the documentation on Sitemaps Protocol and would welcome any further articles that could be of use.

share|improve this question
    
FYI if it was the other way around (sitemap in a subfolder, pointing at URLs in the root), this could be an issue, but what you have is fine. This might be why there is some confusion. –  Tim Fountain Apr 8 '11 at 8:20
    
Hi Tim thats what i thought and probably where the confusion stems from. it good to get an independent opinion though to clear things up. –  Matthew Brookes Apr 10 '11 at 12:40
add comment

3 Answers

up vote 3 down vote accepted

Having just done the same thing (placing the referenced sitemap files in a different sub-folder) I can confirm this works fine with no issues.

  • The XML Sitemap index file doesn't have to be in the root of the site, but it is preferable (for convention)
  • The Sitemaps referenced by the index file don't have to be in the root of the site folder either
share|improve this answer
add comment

I assume you have a robots.txt file and have specified where the sitemaps are. Remember there are many smaller search engines out there. We don't want to make it hard for them. Someday they may be very important.

share|improve this answer
1  
"We don't want to make it hard for them. Someday they may be very important." - The protocol is there to reduce the likelihood of error and if the bots are not doing their part, it's doubtful they'll ever become important enough to justify spending time accommodating them. –  danlefree Apr 7 '11 at 23:38
add comment

I put mine in a directory structure as I please, but URL rewrite them to exist on the root. I don't think it matters much as long as robots.txt points to the correct absolute location.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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