Sitemaps - one per subdomain or one for the base domain?

by John   Last Updated June 30, 2015 13:01 PM

I have more than 5 subdomains on a project, say developer, www, staff and some more, what is the best practice in creating sitemaps?

All subdomains that share a same sitemap at base domain (example.com/sitemap.xml) ? or different sitemaps for different subdomains?(developer.example.com/sitemap.xml and www.example.com/sitemap.xml)

Since the subdomains are several parts of the main application, what are the pros and cons of each, and what should I consider while choosing the one over the other? (one sitemap per subdomain or one for the whole site)



Answers 4


As per in Matt Cutts blog post, he said:

A subdomain can be useful to separate out content that is completely different. Google uses subdomains for distinct products such news.google.com or maps.google.com, for example.

This is similar to what Blogger (blogspot) does.

John's blog (john.blogspot.com) is totally different from Doe's blog (doe.blogspot.com). Google sees this two blogs are two different sites even though the shared same tail (*.blogspot.com).

Each of this blog has their own sitemap and not shared with one to another. If one blog is being deleted, the sitemap file will be deleted as well - and not affecting other blogs' sitemaps.

So, I'd like to recommend to you to use different sitemap files for different sub-domains. Unless you're using sub-directories/sub-folders.

Zulhilmi Zainudin
Zulhilmi Zainudin
June 29, 2015 20:14 PM

As you write the subdomains are part of the whole application there is no need to separate the sitemaps. Google treats subdomains as own domains ayways. But they are smart enough to recognize if parts of a website belong together.

Besides SEO I'd recommend to use an index-sitemap.xml in which you can nest all your separate subdomain-sitemaps. This makes it easier to manage all those files, as you only need to submit one single sitemap. Further you can change a subdomain's sitemap without having to worry about all the other sitemaps. Read more about managing multiple sitemaps on Googles Webmaster Guides: https://support.google.com/webmasters/answer/75712?hl=en

edit

You may take into consideration to create a single property for each subdomain in Google Search Console. This enables you to have more detailed analysis as you will receive data samples and crawling statistics for each property. If you do so I'd recommend to submit an individual sitemap for each subdomain. Be aware that this will require you to verify each property separately and also increase the effort it takes to manage the whole set of properties.

If you're a well organized person and interested in deeper data insights I'd recommend the latter. If you just wand your site to be indexed and crawled properly I'd recommend the index-sitemap story to you.

Always keep in mind to make sure all you sitemaps are configured accurately, matching the standard and deliver only pages that serve a 200 status code. This point is more critical to your website's SEO than the question of how many sitemaps you have.

Seb
Seb
June 29, 2015 21:55 PM

You have to use a separate sitemap for each subdomain.

From the FAQ "Where do I place my Sitemap?":

All URLs listed in the Sitemap must reside on the same host as the Sitemap. For instance, if the Sitemap is located at http://www.example.com/sitemap.xml, it can't include URLs from http://subdomain.example.com. If the Sitemap is located at http://www.example.com/myfolder/sitemap.xml, it can't include URLs from http://www.example.com.

The relevant section from the Sitemaps spec is "Sitemap file location", where it says:

Note that this means that all URLs listed in the Sitemap must use the same protocol (http, in this example) and reside on the same host as the Sitemap. For instance, if the Sitemap is located at http://www.example.com/sitemap.xml, it can't include URLs from http://subdomain.example.com.

unor
unor
July 01, 2015 16:11 PM

I have more than 5 subdomains on a project, say developer, www, staff and some more, what is the best practice in creating sitemaps? ... Since the subdomains are several parts of the main application, what are the pros and cons of each, and what should I consider while choosing the one over the other? (one sitemap per subdomain or one for the whole site)

Since sub-domains attached to the main domain can represent different websites to the world, you're best to setup Sitemaps for each sub-domain for easiest accessibility.

Additionally, I believe its against the rules of Sitemaps to include an external link in a Sitemap belonging to a website, and a URL that contains a different sub-domain counts as an external URL.

As for best practice, if your website has a huge number of links, you'll want to make a master Sitemap file that references smaller Sitemap files where each of them references the individual links. This is because each Sitemap file has a maximum file size limit (of I think 50MB) and also the maximum number of URLs per Sitemap are also limited. I think that number is 50,000.

It is a bonus if you can compress the Sitemaps in gzip format. That way, when you submit them to gzip compliant search engines such as Google, then the Sitemap will be processed faster and the bandwidth consumption on the server will be lower.

Here are links related to sitemaps that may help you more:

http://www.sitemaps.org/protocol.html http://www.sitemaps.org/faq.html

Mike
Mike
July 01, 2015 18:10 PM

Related Questions


Updated December 18, 2016 08:01 AM

Updated March 27, 2015 11:01 AM

Updated November 29, 2018 18:04 PM

Updated August 28, 2019 17:04 PM

Updated April 07, 2016 08:01 AM