缺少 XML 标签 缺少此必需的标签。请添加并重新提交

Missing XML tag This required tag is missing. Please add it and resubmit

我遇到以下问题sitemap

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>http://codingforspeed.com/forum/sitemap.php?fid=1</loc>
    <lastmod>2015-07-06 12:42:18</lastmod>
  </sitemap>
  <sitemap>
    <loc>http://codingforspeed.com/forum/sitemap.php?fid=3</loc>
    <lastmod>2015-07-06 12:42:18</lastmod>
  </sitemap>
  <sitemap>
    <loc>http://codingforspeed.com/forum/sitemap.php?fid=4</loc>
    <lastmod>2015-07-06 12:42:18</lastmod>
  </sitemap>
  <sitemap>
    <loc>http://codingforspeed.com/forum/sitemap.php?fid=5</loc>
    <lastmod>2015-07-06 12:42:18</lastmod>
  </sitemap>
  <sitemap>
    <loc>http://codingforspeed.com/forum/sitemap.php?fid=6</loc>
    <lastmod>2015-07-06 12:42:18</lastmod>
  </sitemap>
  <sitemap>
    <loc>http://codingforspeed.com/forum/sitemap.php?fid=7</loc>
    <lastmod>2015-07-06 12:42:18</lastmod>
  </sitemap>
</sitemapindex>

它被完美地验证了,但是当我提交给 google 网站管理员时它抱怨:

Missing XML tag
This required tag is missing. Please add it and resubmit.

您正在向 Googlebot 提供不同的站点地图内容。这是我们 (Google) 在尝试获取您的站点地图时得到的结果:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
</sitemapindex>

尝试使用 Search Console(以前的网站站长工具)中的 Fetch as Google 或 Testuri)

等工具来获取站点地图本身

您的站点地图遵循 Sitemaps XML format and validates successfully

重新检查错误信息;你只发布了前两行。 其余几行将提供重要线索:

  • 站点地图:确保您认为提交的文件确实是经过验证的文件。
  • 父标签:这是关于错误的重要上下文信息。
  • 标签: 这很关键;它会告诉您缺少什么标签。
  • 行: 告诉您在站点地图文件中查找错误的位置。

解决该问题的简单方法是将站点地图索引页提交到google,因为索引页是网页-在text/html 格式,而不是所需的 text/xml 格式。您需要在 sitemap.xml 页面上提交单独的 .xml 链接。虽然,如果您有很多链接,因为它是一个论坛,这可能具有挑战性。

当站点地图包含零个项目时,也会出现此错误。要解决这个问题,您应该为站点地图创建内容。但是,如果您知道自己制作了内容,则应该 clear/flush 从您的网站、插件、主题、服务器等中缓存。