If you want to utilise Google News Feeds or simply split out a specific section of your site into smaller sitemaps you can use sitemap index xml files to aid you. Sitemap Index XML files are a handy way to keep your sitemap.xml’s organised. Similar to the structure of a normal sitemap.xml file but with different tags, this allows the search engines to identify them as such.

The Sitemap index file uses the following XML tags:

  • <sitemapindex> – the parent tag surrounds the file.
  • <sitemap> – the parent tag for each Sitemap listed in the file (a child of <sitemapindex>)
  • <loc> – the location of the sitemap (a child of <sitemap>)
  • <lastmod> – the last modified date of the sitemap (optional)

These must all be matched with the closing variations of them, for example:</sitemapindex>.

Sitemap Index Structure

The structure when used to its fullest will look like the following example:

<?xml version="1.0" encoding="UTF-8"?>
   <sitemapindex xmlns="http://www.example.com/sitemap_index.xml">
   <sitemap>
      <loc>http://www.example.com/page-sitemap.xml.gz</loc>
      <lastmod>2011-10-10</lastmod>
   </sitemap>
   <sitemap>
      <loc>http://www.example.com/post-sitemap.xml.gz</loc>
      <lastmod>2011-09-10</lastmod>
   </sitemap>
   </sitemapindex>

When you’ve created your Sitemap index file uploaded it to your webserver, following this submit it to Google, Bing or Yahoo. You don’t need to submit each Sitemap individually as the search engines will figure this bit out. Just submit the Sitemap index file and you’re good to go.

Adding sitemap index files to robots.txt

It can also be good practice to include a link to your sitemap index xml file and other sitemaps in your robots.txt file, this can be done with the following line:

User-agent: *
Disallow:
Sitemap: http://www.example.com/sitemap_index.xml

Google Webmasters Tools allows up to 500 sitemaps to be submitted for each website in your Google Webmasters Tools account.

For more information on submitting your sitemap index to the search engines check out the following links:

Google Webmaster Tools
Live Webmaster Tools (MSN)
Yahoo SiteExplorer

Leave a Reply

Your email address will not be published. Required fields are marked *