Mobile app version of vmapp.org
Login or Join
Speyer207

: Does the sitemap necessarily need to be in the root folder? 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

@Speyer207

Posted in: #Sitemap

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.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

3 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

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

e.g.

If you sitemap was located in the following folder:
www.example.com/sitemaps/sitemap.xml

Any URLs that were outside of /sitemap/ directory would not be valid, such as
www.example.com/example-page.html http://www.example.com/example-directory/example-page.html


Only URLs within /sitemaps/ would be valid, such as
www.example.com/sitemaps/example-page.html http://www.example.com/sitemaps//example-directory/example-page.html


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

10% popularity Vote Up Vote Down


 

@Shanna517

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).

10% popularity Vote Up Vote Down


 

@Dunderdale272

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme