Google Sitemaps for big sites: splitting the sitemap into multiple files
By: Xavier Cousin | August 2, 2012 | Web solutions
Sitemaps are an important element of search engine optimization (SEO), in order to provide search engines an accurate outline of what content exists on your site. One of our client sites recently outgrew Google's sitemap URL limit. Instead of removing content from the sitemap, we implemented a simple solution of using a sitemap index to reference multiple sitemap files.
By default, Google allows a single sitemap file to reference up to 50,000 URLs (and be up to 50mb in file size, uncompressed). This limit, however, is only enforced per file.
The simplest and cleanest way to build your sitemap if you have more than 50,000 URLs to reference is to use a sitemap index, whose only role is to list sitemap files.
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>http://www.example.com/sitemap1.xml</loc> <lastmod>2012-01-01T11:11:11+00:00</lastmod> </sitemap> <sitemap> <loc>http://www.example.com/sitemap2.xml</loc> <lastmod>2012-01-01T11:11:11+00:00</lastmod> </sitemap> </sitemapindex>
Once your sitemap index is built and submitted to Google, the linked sitemaps will automatically start to be crawled.
There is a limit of 50,000 sitemaps per index, so the total limit of URLs per sitemap index file is 2,500,000,000. This should be enough for most sites, but if not, you can submit up to 500 index files!