You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

BlogPosting Schema未被Google验证工具识别问题排查

博客文章BlogPosting Schema验证失败问题排查

你的Schema无法被Google正确识别,核心问题及修正方案如下:

  • 缺少必填的@context字段:这是Schema.org结构化数据的核心标识,没有它Google无法识别Schema类型体系,会错误拼接页面URL与@type形成无效路径(即你看到的https://example.com/mag/train-refund-guide/BlogPosting)。必须在根对象中添加"@context": "https://schema.org"。

  • articleSection格式错误:该字段要求接收数组类型,而非逗号分隔的字符串,正确写法为["cat1", "cat2"],才能被正确识别为文章分类。

  • primaryImageOfPage引用不规范:仅通过@id引用图片URL时,Google无法获取图片元数据(如尺寸、格式),建议直接将图片定义为ImageObject对象,补充必要的图片属性。

  • 冗余字段name:BlogPosting类型中headline已作为标题字段,name属于重复定义,建议移除避免冲突。


修正后的完整Schema代码

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "title",
  "datePublished": "2024-07-30T09:05:20+03:30",
  "dateModified": "2025-01-01T09:13:18+03:30",
  "articleSection": ["cat1", "cat2"],
  "author": {
    "@id": "https://example.com/mag/author/abc/",
    "name": "abc"
  },
  "publisher": {
    "@id": "https://example.com/#organization",
    "name": "site"
  },
  "description": "description",
  "mainEntityOfPage": {
    "@id": "https://example.com/mag/train-refund-guide/"
  },
  "isPartOf": {
    "@id": "https://example.com/#website"
  },
  "primaryImageOfPage": {
    "@type": "ImageObject",
    "@id": "https://example.com/wp-content/uploads/2024/07/train-cancel-1-e1734600689487.webp",
    "url": "https://example.com/wp-content/uploads/2024/07/train-cancel-1-e1734600689487.webp",
    "width": 1200,
    "height": 675
  },
  "inLanguage": "fa-IR",
  "subjectOf": {
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "url": "https://example.com/mag/train-refund-guide/#faq-question-%d8%a8%d8%b9%d8%af-%d8%a7%d8%b2-%d8%ae%d8%b1%db%8c%d8%af-%d8%a8%d9%84%db%8c%d8%b7-%d9%82%d9%82%d8%a7%d8%b1-%d9%85%db%8c%d8%aa%d9%88%d8%a7%d9%86%d9%85-%d8%a2%d9%86-%d8%B1%d8%a7-%da%a9",
        "name": "question1",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "answer1"
        }
      },
      {
        "@type": "Question",
        "url": "https://example.com/mag/train-refund-guide/#faq-question-%d8%a2%db%8c%d8%a7-%d9%85%db%8c%d8%aa%d9%88%d8%a7%d9%86%d9%85-%d8%a8%d9%84%db%8c%d8%b7-%d8%ae%d9%88%d8%af-%d8%b1%d8%a7-%d8%af%d8%b1-%d9%87%d8%b1-%d8%b2%d9%85%d8%a7%d9%86%db%8c-%d8%a7%d8%b3",
        "name": "question2",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "answer2"
        }
      },
      {
        "@type": "Question",
        "url": "https://example.com/mag/train-refund-guide/#faq-question-%d8%a2%db%8c%d8%a7-%d8%a8%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%af%d8%a7%d8%af-%d8%a8%d9%84%db%8c%d8%b7-%d8%a8%d8%a7%db%8c%d8%af-%d9%87%d8%b2%db%8c%d9%86%d9%87%d9%87%d8%a7%db%8c-%d9%be",
        "name": "question3",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "answer3"
        }
      },
      {
        "@type": "Question",
        "url": "https://example.com/mag/train-refund-guide/#faq-question-%d8%aa%d8%a7-%da%86%d9%87-%d8%b2%d9%85%d8%a7%d9%86%db%8c-%d8%af%d8%b1-%d8%b5%d9%88%d8%b1%d8%aa-%da%a9%d9%86%d8%b3%d9%84%db%8c%d8%8c-%d9%85%d8%a8%d9%84%d8%ba-%da%a9%d9%84-%d8%a8%d9%84%db%8c%d8%b7",
        "name": "question4",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "answer4"
        }
      }
    ]
  }
}
</script>

内容的提问来源于stack exchange,提问作者Alipvd

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.15 01:40:55