如果您直接 301 将站点地图托管在不同的域上,它会损害 SEO 吗?

Would it hurt SEO for a sitemap to be hosted on a different domain if you 301 direct to it?

我们使用 cron job 定期计算站点地图并将结果存储在 s3 中。

我们可以 301https://oursite.com/sitemap.xml 重定向到 s3 上托管的 sitemap.xml 吗?

我知道站点地图规范要求站点地图位于同一域 (http://www.sitemaps.org/protocol.html#location)。但是 301off-domain URL 会被主要的搜索提供商视为在同一个域中还是不在同一个域中?

是的,你可以。简而言之,您必须证明您拥有父站点,您可以通过在父站点的 robots.txt 文件中包含来自 s3 的站点地图 URL 来做到这一点。

父站点的 robots.txt 应该有这样的部分:

# myawesomesite.com/robots.txt

[...]
Sitemap: http://s3.yoursite.com/sitemap.xml

Sitemaps & Cross Submits section of Sitemaps.Org

中查看更多内容