Indexing different subdomains on a sitemap

by JoãoMarcelo   Last Updated July 06, 2016 09:01 AM

I'm building a sitemap for a page available in different languages, however the URL construction was done with subdomains and not folders. I'd like to know if it's possible to indicate a different sitemap for the subdomain pages inside the main page, as follows:

</url>
<loc>http://www.example.com/</loc>
</url>
<url>
<loc>http://fr.example.com/index-sitemap.xml</loc>
</url>
<url>
<loc>http://es.example.com/index-sitemap.xml</loc>
</url>
<url>
<loc>http://it.example.com/index-sitemap.xml</loc>
</url>
<url>
<loc>http://blog.example.com/index-sitemap.xml</loc>
</url>


Answers 1


The one unfortunate rule with sitemaps is that they are for one site only. In otherwords, you cannot reference more than one domain name. In your example, you are referring to example.com, fr.example.com, es.example.com, etc. This will not work. Sorry.

Instead, you simply have to create a sitemap per domain and sub-domain, register the sub-domain with Google Search Console (webmaster tools) as a property, then submit a site-map for each. As well, for each domain and sub-domain, you can optionally use the sitemap directive in your robots.txt file found here: https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt#google-supported-non-group-member-records. Both options will work, however, it is recommended that each site be registered as a property with Google for other reasons and would likely be more effective.

closetnoc
closetnoc
July 06, 2016 13:34 PM

Related Questions


Updated November 29, 2018 18:04 PM

Updated August 28, 2019 17:04 PM

Updated April 07, 2016 08:01 AM

Updated April 17, 2015 21:01 PM

Updated April 15, 2016 08:01 AM