itemtype 必须为完整 https schema.org url 且结尾带斜杠,如 https://schema.org/product/;需与 itemscope 成对使用,嵌套符合类型约束,并确保页面可被爬虫访问。

itemtype 的取值必须是有效的 Schema.org URL
直接写 itemtype="Product" 或 itemtype="https://schema.org/Product" 都不行——前者缺少协议和域名,后者缺了末尾斜杠(虽然部分解析器容忍,但不规范)。实际生效的只有完整、可访问的 Schema.org 类型 URL,例如:itemtype="https://schema.org/Product/"。
常见错误现象:浏览器不报错,但 Google Rich Results Test 显示 “No structured data detected”,往往就是 URL 格式不对或重定向失败。
- 必须以
https://schema.org/开头,不能用http(现代解析器普遍拒绝) - 类型名后必须带尾部斜杠(
/),这是 Schema.org 官方定义的 URI 结构,不是可选的 - 大小写敏感:
Product有效,product或PRODUCT无效 - 不能省略协议和域名,
itemtype="Product/"或itemtype="//schema.org/Product/"均不被识别
如何查证某个类型是否可用且拼写正确
别靠记忆或搜索片段,Schema.org 本身提供机器可读的类型清单。最可靠的方式是访问 https://schema.org/docs/full.html(完整类型树)或直接查单个类型的页面,比如 https://schema.org/Restaurant/ —— 注意地址栏末尾的 /,这就是你要复制的完整值。
使用场景:当你不确定 LocalBusiness 和 Organization 哪个更合适,或者纠结 Article 是否要加 CreativeWork 父类时,直接打开对应页面,看 “More specific Types” 和 “Used on these types” 区域,能立刻判断继承关系和适用上下文。
文章转信息图。将文章/笔记转化为手机可读的 HTML 信息图,自动匹配视觉风格。触发场景:文章转图、笔记转图、信息图、转小红书图、做张图、可视化这篇文章、文生图。
- 所有有效类型页面都返回 HTTP 200,且 HTML 中包含
<link rel="canonical" href="https://schema.org/Type/"> - 如果访问
https://schema.org/FooBar/返回 404,说明该类型不存在,不要硬写 - 避免使用已废弃类型(如
http://schema.org/NewsArticle的旧 HTTP 版本),一律用 HTTPS + 尾斜杠新版
itemtype 和 itemscope 必须成对出现,且嵌套需合法
itemtype 单独写没有意义,它必须与 itemscope 同时出现在同一个元素上,否则解析器会忽略。更关键的是,嵌套结构必须符合 Schema.org 类型约束 —— 比如 https://schema.org/Restaurant/ 要求 address 是 PostalAddress 类型,不能直接塞字符串。
典型错误:在 <div itemscope itemtype="https://schema.org/Restaurant/"> 内写 <code><span itemprop="address">北京市朝阳区...</span>,结果结构化数据缺失 address 字段。
- 必须为子属性显式声明新 scope:
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress/"> <li>不能跨层级复用 scope:父级 <code>itemtype="https://schema.org/Event/"下的location属性,不能直接用itemprop="name"表示地点名称,得先开一个itemscope itemtype="https://schema.org/Place/" - Google Structured Data Testing Tool 会明确提示 “Missing field ‘xxx’”,但不会告诉你该字段需要什么类型,得回 Schema.org 页面查 property 的 expected type
- 用 Chrome DevTools 的 Elements 面板搜索
itemtype,确认它真实存在于当前 DOM 节点上(而非仅在模板字符串里) - 禁用 JS 后刷新页面,看结构化数据是否还存在 —— 如果消失,说明不可靠,应优先用服务端渲染或内联 JSON-LD
- 注意 CMS 或建站工具(如 WordPress 插件)可能自动覆盖或删除自定义
itemtype,需检查输出过滤钩子
验证时别只看 HTML 源码,要检查渲染后的 DOM
很多项目用 JS 动态注入 itemtype 和 itemprop,但 Google 搜索引擎抓取的是最终渲染结果。如果你在源码里看到正确的 itemtype="https://schema.org/Recipe/",但测试工具报错,大概率是 JS 执行出错、条件未满足导致节点没挂上属性,或者框架(如 React/Vue)的 SSR 不一致。
性能影响不大,但兼容性陷阱明显:某些旧版屏幕阅读器或 SEO 工具只解析静态 HTML,而 Googlebot 现在能执行 JS,但有超时限制(约 5 秒)。如果结构化数据依赖异步加载的 JSON-LD 再转成 Microdata,就容易漏掉。
X-Robots-Tag: noindex 或 robots.txt 拒绝爬虫,所有 itemtype 都不会被任何搜索引擎处理。










