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

22,915

Solution 1

As per 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 these two blogs as two different sites even though they share the same tail (*.blogspot.com).

Each of these blogs have their own sitemap and are not shared between one another. If one blog gets deleted, the sitemap file will be deleted as well - and it does not affect the 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.

Solution 2

Generally, you have to use a separate sitemap for each host (i.e., different protocol, domain, or 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.

However, if you can prove ownership of all hosts via robots.txt or Google Search Console, you can host the sitemaps on different hosts:

Solution 3

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.

Share:
22,915

Related videos on Youtube

x0x
Author by

x0x

Updated on September 18, 2022

Comments

  • x0x
    x0x over 1 year

    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)

  • Dogweather
    Dogweather over 7 years
    I don't believe this answers the question of where sitemaps should be served from.
  • Mark Rejhon
    Mark Rejhon almost 6 years
    It seems that if they are all running off the same Google Verification (all listed in same Google Console, confirming you're the same owner) Google actually seems to make an exception according to: support.google.com/webmasters/answer/75712?hl=en Then it appears it is okay for sitemaps for any of those sites to reference each other. At least, that is the impression I get from Google Support website. This is an exception to normal sitesmaps.org rules.
  • unor
    unor almost 6 years
    @MarkRejhon: Thanks for the info :) I updated the answer, and also listed another way (from sitemaps.org protocol) that allows sitemaps hosted on different hosts.
  • Alexis Wilke
    Alexis Wilke over 5 years
    "I'd like to recommend to you to use different sitemap files [...]" This statement is incorrect. You do NOT have a choice. Different websites require you to have different sitemaps.
  • zb'
    zb' almost 3 years
    but if sitemap on example.com can it include example.com ?