13

The website is very, very large and I have created:

  • sitemap_fr.xml
  • sitemap_en.xml
  • sitemap_es.xml

Is this solution OK? If so, do I have to insert a tag to inform Google about the different sitemaps? I no longer just have sitemap.xml which it could find automatically.

I am using hreflang tags already:

<link rel="alternate" hreflang="fr" href="http://website.net/fr" >
<link rel="alternate" hreflang="en" href="http://website.net/en" >
<link rel="alternate" hreflang="es" href="http://website.net/es" >

3 Answers 3

14

You can have multiple sitemaps per website, and this is a great example of when that makes sense.

You should make sure you have a Sitemap Index listing each of your sitemaps. It will probably look something like:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
        <loc>http://website.net/sitemap_fr.xml</loc>
        <lastmod>2004-10-01</lastmod>
    </sitemap>
    <sitemap>
        <loc>http://website.net/sitemap_en.xml</loc>
        <lastmod>2005-01-01</lastmod>
    </sitemap>
    <sitemap>
        <loc>http://website.net/sitemap_es.xml</loc>
        <lastmod>2005-01-01</lastmod>
    </sitemap>
</sitemapindex>

Remember to link that index in your robots.txt file, like:

Sitemap: http://website.net/sitemapindex.xml

There's also the option to indicate alternate language pages within your sitemap itself. It's slightly more complicated to set up and doesn't inherently answer the original question about the user's suggested setup.

0
3

Andrew Loft's suggestion of a sitemap index file is perfectly acceptable. I agree with him that multiple sitemaps per site is OK and your use case for it is a good one.

There are two other ways to let Google know about multiple sitemaps that work just as well:

Submit all the sitemaps to Google Webmaster Tools

You can submit a sitemap, no matter what it is named, via Google Webmaster Tools. Google's help documentation explains how.

Once a sitemap is submitted in GWT, Google also shows you additional information about it such as the number of URLs from it which made it into Google's index.

List them all in robots.txt

Sitemaps can be listed in robots.txt. The syntax is:

Sitemap: http://example.com/sitemap_fr.xml
Sitemap: http://example.com/sitemap_en.xml
Sitemap: http://example.com/sitemap_es.xml
2
  • This works well for Google, but doesn't follow the same spec for other search engines. Using a Sitemap Index will tell all search engines about your structure. Commented Feb 13, 2018 at 18:51
  • @AndrewLott listing them all in the sitemap directly should work for all search engines. Commented Feb 13, 2018 at 19:39
0

Tag hreflang should be use in deeper level when structure looks like below

Sitemap: http://example.com/sitemap_fr.xml
Sitemap: http://example.com/sitemap_en.xml
Sitemap: http://example.com/sitemap_es.xml

Or maybe for example sitemap_fr.xml has only FR content without hreflang related to other languages

1
  • It was probably just an example and he probably uses the hreflang for all the pages. Commented Feb 10, 2019 at 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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