为什么此站点地图失败

问题描述 投票:1回答:1

我已经尝试了几乎所有我能想到的东西,并在这里搜索无济于事。为什么此供稿似乎在Google网站站长工具中不起作用:

https://www.campgroundreviews.com/sitemap

其截断版本为:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
        <loc>https://www.campgroundreviews.com/sitemap/users/1</loc>
    </sitemap>
    <sitemap>
        <loc>https://www.campgroundreviews.com/sitemap/users/2</loc>
    </sitemap>
</sitemapindex>

以及单个站点地图(https://www.campgroundreviews.com/sitemap/cities/13)的截断版本:

<?xml version="1.0" encoding="UTF-8"?><urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
    <url>
        <loc>http://www.campgroundreviews.com/regions/california/twentynine-palms-marine-corps-ctr</loc>
        <priority>0.8</priority>
        <lastmod>2019-11-27T23:31:14+00:00</lastmod>
        <changefreq>daily</changefreq>
    </url>
    <url>
        <loc>http://www.campgroundreviews.com/regions/california/travis-afb</loc>
        <priority>0.8</priority>
        <lastmod>2019-10-24T02:00:58+00:00</lastmod>
        <changefreq>daily</changefreq>
    </url>
    <url>
        <loc>http://www.campgroundreviews.com/regions/california/yuba</loc>
        <priority>0.8</priority>
        <lastmod>2019-03-12T11:00:38+00:00</lastmod>
        <changefreq>daily</changefreq>
    </url>
</urlset>

标题中的内容类型将作为text/xml; charset=UTF-8返回。

在Google网站管理员工具中,我得到:

Webmaster Tools

没有找到URL。它总是说Sitemap is HTML,但对于我的一生,我不知道为什么。

有什么想法吗?

html xml sitemap google-webmaster-tools google-sitemap
1个回答
0
投票

在这种情况下,这不是站点地图本身的问题。我们根据Google的建议(https://developers.google.com/search/docs/guides/dynamic-rendering)使用了prerender,但是我忘记将站点地图URL列入黑名单,因此网站管理员工具是通过prerender.io而不是直接从服务器查看地图的。

希望这对将来的其他人有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.