为什么这个站点地图失败

Why Does This Sitemap Fail

我已经尝试了几乎所有我能想到的方法,并在此处进行了搜索,但无济于事。为什么此 Feed 在 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>

header 中的 content-type 返回为 text/xml; charset=UTF-8

在 Google 网站站长工具中我得到:

未发现任何 URL。它总是说 Sitemap is HTML 但对于我来说,我无法弄清楚为什么。

有什么想法吗?

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

希望这对以后的其他人有所帮助。