Celebrating 20 years online :)
Web Dev + WordPress + Security

Multiple Sitemaps

Yes you can have multiple sitemaps for your site. Create the sitemaps you need, and then specify them in your robots.txt file. For example, here are the robots.txt directives for the two sitemaps used here at Perishable Press:

Sitemap: https://perishablepress.com/sitemap-perish.xml
Sitemap: https://perishablepress.com/sitemap-press.xml

That’s really all there is to it. Compliant search engines do a good job of keeping track of everything, just include the URLs of your sitemap(s) at the end of your site’s robots.txt file. Search engines like Google, Bing, and others will take it from there.

If you want to list more than 50,000 URLs, you must create multiple Sitemap files. — sitemaps.org

Webmaster Tools

If you use Google Webmaster Tools, remember to log in and specify your sitemap(s). Likewise for any other services you might be using for sitemaps, statistics, and SEO.

Google XML Sitemaps

If you’re using the incredibly awesome Google XML Sitemaps plugin for WordPress, multiple sitemaps aren’t possible, but you can specify an alternate path/name for your sitemap.

There seems to be a bug in version 3.2.4 of the plugin where the Automatic detection of a custom-named sitemap fails with an error. But really not a big deal because there is also an option for choosing a Custom location, as seen in this screenshot:

[ Screenshot: Settings for Google XML Sitemaps ]

So to specify a custom name for your sitemap, just use the custom location and you’re all set. Is there good a WordPress plugin for auto-generation of multiple sitemaps? Yes, it’s called Better WordPress Google XML Sitemaps, and it includes sitemapindex and MultiSite support.

Roll Your Own Sitemap Index

If you’re using multiple sitemaps, you should create a Sitemap Index that lists each of them. As instructed by sitemaps.org, create a blank XML file named something like sitemap-index.xml. In it, place the following code:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

Replace the <loc> values with the locations of your sitemaps. Then instead of listing and linking to all of your sitemaps individually, you can just refer to your Sitemap Index. For example, here is the robots.txt directive for the Sitemap Index used at Perishable Press:

Sitemap: https://perishablepress.com/wp-sitemap.xml

Note that a Sitemap Index file can only specify Sitemaps that are found on the same domain. In most cases, you can just list multiple sitemaps in your robots.txt file and be done with it. If you would like to consolidate things into a single URL, then creating a Sitemap Index is the way to go.

Essential Resources

About the Author
Jeff Starr = Fullstack Developer. Book Author. Teacher. Human Being.
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »

9 responses to “Multiple Sitemaps”

  1. Thanks for the awesome article! I wonder what the advantage for having multiple sitemaps is–other than listing more than 50k URLs. Could you give some examples where having multiple sitemaps might be better than having a single one? Is it better for SEO to have e.g. category specific or visitor group specific sitemaps?

    • @chris The only time to have multiple sitemaps is when you have more than 50,000 URLs to list or the file size is beyond 10MB.

      There is no added benefit in creating multiple sitemaps because they don’t guarantee a site will be crawled and indexed, only that the URL exists.

  2. The idea of multiple sitemaps is cool. I’m using the GD Press Tools plugin, and it allows me to create sitemap for post types (posts, pages, custom post types), taxonomies (categories, tags, custom taxonomies), … and add them into robots.txt file.

    I think it’s a fast way to handle multiple sitemaps. Just one thing: it doesn’t help creating other type of custom sitemaps (I’m not using it, but Yoast has mentioned about this before on his blog)

  3. Multiple sitemaps have it’s benefits when you have 1000s of URLs.

    Nice article, BTW.

  4. Chris one benefit of multiple sitemaps is having an .xml sitemap and also a Geositemap which is a .kml file if you have a static location for your business…

  5. Pali Madra 2011/04/29 6:48 am


    Thank you for the great post. One n00b question – what is the advantage of Geositemap and can you please refer a resource that I can use to understand Geositemaps.

    Keep up the good work.!

  6. Webby Dev Rob 2011/05/01 11:22 am

    Great article, explains everything really well – especially the roll your own section.

    Personally, i always use them on bigger sites and/or CMS sites as it makes it easier to generate them dynamically if you split you content into distinct sections.

  7. Web Developer 2011/06/20 1:41 am

    Hi, this come in time to me. I was just about to create a second sitemap, but, no I’ve learned something.

    Thanks for sharing with us. Keep the good job.

Comments are closed for this post. Something to add? Let me know.
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
Crazy that we’re almost halfway thru 2024.
I live right next door to the absolute loudest car in town. And the owner loves to drive it.
8G Firewall now out of beta testing, ready for use on production sites.
It's all about that ad revenue baby.
Note to self: encrypting 500 GB of data on my iMac takes around 8 hours.
Getting back into things after a bit of a break. Currently 7° F outside. Chillz.
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.