1

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.

2
  • 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. Apr 8, 2011 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. Apr 10, 2011 at 12:40

3 Answers 3

3

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
0

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.

1
  • 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, 2011 at 23:38
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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