Beginner SEO

Sitemaps for subdomains – How to set it the right way?

This article was updated on August 6th, 2020 at 05:57 am

So, imagine you have a main domain and a sub domain – Site A and sub.SiteA, how will you implement sitemaps for each entity?

Should you have just one sitemap under the main site or should you have two sitemaps for both the main site and the subdomain?

Let’s find out.

Sitemaps – General thumb rule for installation

The general thumb rule for installing sitemaps are on the site root folder.

i.e, if it is Site A, then

According to Sitemap standards,

Sitemaps are an easy way for webmasters to inform search engines about pages on their sites that are available for crawling. In its simplest form, a Sitemap is an XML file that lists URLs for a site along with additional metadata about each URL (when it was last updated, how often it usually changes, and how important it is, relative to other URLs in the site) so that search engines can more intelligently crawl the site.

Web crawlers usually discover pages from links within the site and from other sites. Sitemaps supplement this data to allow crawlers that support Sitemaps to pick up all URLs in the Sitemap and learn about those URLs using the associated metadata. Using the Sitemap protocol does not guarantee that web pages are included in search engines, but provides hints for web crawlers to do a better job of crawling your site.

So Sitemaps can be used when you have a large number of files to be indexed and want to tell search engines how to find them

Since each sitemap can only feature up to 500 links, it is advised to split them up in parts.

That is, to have a sitemap index and link to the parts from the index.

So, to answer this question, it is recommended to have the sitemap on the root folder for both the main site and the subdomain.

That is,

For Site A > Sitemap at

And have another (or how many ever sitemaps you want) sitemap in the same folder, but link to them from the index sitemap.

For Subdomain ( > Sitemap at

To get this done, use a free XML site generator and generate sitemaps of all the subdomains as well as main site.

Then create a sitemap index file using the following format.

<?xml version="1.0" encoding="UTF-8"?>
   <sitemapindex xmlns="">

Now, in the sitemap index, add the subdomain sitemaps (which are in the same folder).

Hope that helped.

Amazing WordPress Theme