如果sitemapindex位于根路径中,站点地图文件是否可以位于文件夹中?

时间:2011-01-28 09:08:13

标签: sitemap

我希望有一个sitemap结构,其中sitempasindex文件位于根路径(example.com/sitemaps.xml)中,它引用位于文件夹中的多个sitemap [n] .xml文件(example.com/static /sitemap1.xml)。那些sitemap [n] .xml文件链接到rooth路径中的网页(例如example.com/helloworld.html)。

这是可能的吗?我问,因为我知道如果sitemap.xml文件放在一个文件夹中,它只能包含该文件夹下的网页。

谢谢!

2 个答案:

答案 0 :(得分:1)

Sitemap文件的位置决定了该Sitemap中可包含的一组网址。位于http://example.com/catalog/sitemap.xml的Sitemap文件可以包含以http://example.com/catalog/开头的任何网址,但不能包含以http://example.com/images/开头的网址。

从谷歌的角度来看,它们应该可以在网站的主根上找到。 http://example.com/sitemap.xml,当您通过网站管理员工具“http://example.com/catalog/sitemap.xml”中的子网站提交时,Google将不会对其进行抓取并始终向我们显示待处理的索引状态。

答案 1 :(得分:0)

我相信你很容易拥有 example.com/sitemap-index.xml 指向例如 example.com/sub1/sitemap.xml 和 example.com/sub2/sitemap.xml

但是每个sitemap.xml应该只包含每个子文件夹中的URL。 (根据您的问题,您似乎将这些sitemap.xml文件链接到root中的路径。我怀疑可行,但您可以尝试运行一个小测试并提交给Google。如果没有错误那么。 ..)

相关问题