I have created a sitemap index and all the additional sitemaps that I want to upload into webmasters tools. Do I need to keep them in the root folder or can I just create a folder called "sitemaps" where I can store them all.

The reason I ask is because I see 99% of the websites keep them in the root folder and I do not know if it's a reason behind this. Perhaps other search engines can find it quicker this way?

Thank you.


3 Answers 3


No you do not need to keep them in the root folder, they do not need a file extension either. You should however have a redirect in place so that yourdomain.com/sitemap.xml points to wherever it's available at. This ensures that bots besides those you tell are able to find it via that common path. Here are a few examples I can think of that work for sitemaps:

  • A sitemap without file extension generated via index.php and available through a route/query such as "feed/sitemap" (Laravel, Codeigniter, Opencart, etc)
  • A sitemap generated via Cron and stored within public folder location that is buried ~6 levels deep (CS-Cart and others)
  • A sitemap that isn't even stored in the same server or same IP, think if you have 100k pages, a specialized app could sync, generate, and store all your sitemaps, feeds, etc to keep the load in the purpose built "app".
  • A sitemap that is chain loaded from another primary sitemap on another domain, such as loading blog, corp, KB, and other sitemap assets right in the primary domain sitemap.

I can not comment but wanted to add my two cents:

You should however have a redirect in place so that yourdomain.com/sitemap.xml points to wherever it's available at

This may or may not be desirable. By providing a publicly accesible sitemap you're providing your competition an easy way to track your website content and progress.

This gives anyone a quick list of URLs your website has, making it unnecesarily to crawl it in order to monitor it.

I would suggest against using /sitemap.xml and, instead, use a name that is harder to guess, ie /my_website_sitemap.xml, and submit the sitemap to the most popular search engines, ie Google & Bing (the latter shares data with Yahoo Search).

  • I hope you aren't the one who downvoted, because this is BS. You don't have to crawl to monitor it. Just site:domain.com in google to see all indexed pages, including the sitemap itself.
    – dhaupin
    Mar 17, 2016 at 17:03
  • Uh, no I did not. This is by far a lot more complicated and involves crawling Google SERPS. By the way, my website's sitemap is not indexed.
    – Juanpi
    Mar 17, 2016 at 17:30

There is a reason, URLs in an XML sitemap must be at the same, or lower level then where the sitemap is located.


If you sitemap was located in the following folder:


Any URLs that were outside of /sitemap/ directory would not be valid, such as


Only URLs within /sitemaps/ would be valid, such as


This is outlined in Google's XML sitemap guildines as well as the offical xml sitemap protocols

  • This answer deserves more upvotes.
    – Rounin
    Jun 27, 2021 at 20:01
  • @Max I'm curious if this is still the case? I couldn't locate what you're saying in the Google XML sitemap guidelines anymore
    – user4779
    Mar 20 at 9:34

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.