大网数据广告活动
网站运营与故障问答

Is a different sitemap per language OK? How do I tell Google about them?

· 52CE 我爱测

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.x…

问题原文

原帖链接 · ziloouweb · CC BY-SA 3.0

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" >

已采纳解答

原帖链接 · Andrew Lott · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2014-12-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。