How to create a custom sitemap of multiple subdomains?

by clarabelle , in category: SEO , 7 months ago

How to create a custom sitemap of multiple subdomains?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer


by bertha , 7 months ago


To create a custom sitemap for multiple subdomains, you can follow these steps:

  1. Identify the subdomains: Determine all the subdomains you want to include in the sitemap. For example, if your main domain is and you have subdomains like and, list them all.
  2. Generate individual sitemaps: Create separate sitemaps for each subdomain using Sitemap protocol guidelines. You can use online sitemap generator tools or create XML sitemaps manually. Name each sitemap file accordingly, such as sitemap-blog.xml and sitemap-shop.xml.
  3. Combine the sitemaps: Create a new XML file for the main domain, e.g., sitemap-main.xml. In this file, include the individual subdomain sitemaps using the
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="">

  1. Update the robots.txt file: Include the reference to the new sitemap file in the robots.txt file for each subdomain. For example, in the robots.txt file of the blog subdomain, add:

Similarly, update the robots.txt file for other subdomains, replacing the URL accordingly.

  1. Submit the sitemaps to search engines: Visit the Google Search Console or other search engine webmaster tools and submit the main sitemap (sitemap-main.xml) as well as any individual subdomain sitemaps. This helps search engines discover and index your content more effectively.

By following these steps, you can create a custom sitemap for multiple subdomains, ensuring search engines can crawl and index all the relevant pages on your website.