【问题标题】:Sitemap xml tag error for search console: Invalid XML tag <sitemap>搜索控制台的站点地图 xml 标记错误:无效的 XML 标记 <站点地图>
【发布时间】:2017-11-29 18:52:29
【问题描述】:

我无法在 2 个 sub-sitemap.xml 完整的情况下将此主 XML 提交给谷歌。

当我将它提交到搜索控制台进行索引时,它给了我这个错误:

错误 XML 标记无效 无法识别此标记。请修复它并 重新提交。父标签:urlset 标签:sitemap

我的mastersitemap.xml如下,谢谢大家的帮助~

    <?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.domain.domain/</loc>
    <changefreq>daily</changefreq>
    <priority>0.9</priority>
  </url>
  <sitemap>
    <loc>https://www.domain.domain/sitemap5-0.xml</loc>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
  </sitemap>
  <sitemap>
    <loc>https://www.domain.domain/sitemap5-1.xml</loc>
    <changefreq>daily</changefreq>
    <priority>1.0</priority>
  </sitemap>
</urlset>

【问题讨论】:

    标签: google-search-console xml-sitemap


    【解决方案1】:

    您需要使用url 删除您的sitemap 元素:

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
        <loc>https://www.domain.domain/</loc>
        <changefreq>daily</changefreq>
        <priority>0.9</priority>
      </url>
      <url>
        <loc>https://www.domain.domain/sitemap5-0.xml</loc>
            <changefreq>daily</changefreq>
            <priority>1.0</priority>
      </url>
      <url>
        <loc>https://www.domain.domain/sitemap5-1.xml</loc>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
      </url>
    </urlset> 
    

    此站点地图有效。

    【讨论】:

      猜你喜欢
      • 2010-12-14
      • 1970-01-01
      • 1970-01-01
      • 2014-03-17
      • 1970-01-01
      • 2011-04-14
      • 1970-01-01
      • 2020-10-05
      • 2021-05-23
      相关资源
      最近更新 更多