0

我通过以下链接http://www.sitemaps.org/protocol.html进行站点地图和交叉提交,但如果以下方法正确与否,则没有得到澄清:

我有以下网站,一个用于桌面用户,另一个用于移动用户,两者都提供不同的内容: https://www.mainsite.com并且https://mobile.site.com两个域都指向同一个网站物理根目录,并且根据用户的设备,域 URL 已更改。

我在此根目录中放置了一个 robots.txt 文件,其中包含 sitemap_index.xml 文件的条目:

sitemap: https://www.mainsite.com/sitemap_index.xml

在 sitemap_index 文件中

    <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
    <loc>
     https://www.mainsite.com/sitemap_desktop_www.xml
    </loc>
    <lastmod>2015-09-04</lastmod>
    </sitemap>
    <sitemap>
    <loc>
    https://mobile.site.com/sitemap_mobile_www.xml
    </loc>
    <lastmod>2015-05-22</lastmod>
    </sitemap>
    </sitemapindex>

这种方法正确吗?

如果机器人读取域和 sitemap_index.xml 中的 robots.txt 和 sitemap_index.xml 文件,www.mainsite.com它会忽略mobile.site.com吗?

4

1 回答 1

0

您必须在 Google 网站管理员中将您的两个网站添加为两个属性,并且在每个属性中您都可以添加 XML 站点地图,而无需 robots.txt

Google 将开始抓取您的网站并将其编入索引,并查看每个域的 XML 站点地图。

于 2016-06-05T09:27:05.170 回答