1

This question already has an answer here:

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>

marked as duplicate by John Conde Jul 6 '16 at 14:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    To clarify, are you wanting a sitemap index that lists all the sitemaps for your website? – zigojacko Jul 6 '16 at 7:43
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.