itemtype必须是完整HTTPS URL,如https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Person;须与itemscope成对出现于同一元素;子对象需独立声明itemscope+itemtype;URL须可访问且返回200。

itemtype 必须是完整 HTTPS URL,不能缩写或省略协议
itemtype 的值不是类型名称,而是指向外部词汇表的绝对地址。写成 Person、https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Person/(末尾斜杠)、http://schema.org/Person 或 //schema.org/Person 全部无效。
- ✅ 正确:
itemtype="https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Person" - ❌ 错误:
itemtype="Person"(解析器无法识别字符串类型) - ❌ 错误:
itemtype="https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Person/"(末尾斜杠导致 404 或不匹配) - ❌ 错误:
itemtype="http://schema.org/Person"(HTTP 已被 Google 等主流工具拒绝)
2026 年起,http://data-vocabulary.org/ 已彻底停用,所有新项目必须切到 https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937。
itemtype 必须与 itemscope 成对出现在同一元素上
单独写 itemscope 没有意义,它只是开启作用域的开关;没有 itemtype,搜索引擎根本不知道这个 scope 描述的是什么实体。
- ✅ 正确:
<div itemscope itemtype="https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Article">...</div> - ❌ 错误:
<div itemscope><span itemtype="https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Article">...</span></div>(itemtype不在itemscope元素上) - ❌ 错误:
<div itemtype="https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Article">...</div>(缺itemscope,整个块被忽略)
浏览器不会报错,但 Google Rich Results Test 会直接跳过该容器,结构化数据零上报。
立即学习“前端免费学习笔记(深入)”;
嵌套结构中每个子实体都要独立声明 itemscope + itemtype
当 itemprop 值本身是一个对象(如 author、location、review),不能只靠父级 scope 覆盖——子对象必须自己带 itemscope 和对应 itemtype,且必须紧贴在 itemprop 所在元素上。
- ✅ 正确:
<div itemprop="author" itemscope itemtype="https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Person">张三</div> - ❌ 错误:
<div itemprop="author"><div itemscope itemtype="https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Person">张三</div></div>(itemprop未绑定到任何itemscope) - ❌ 错误:
<div itemscope itemtype="https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Person"><span itemprop="name">张三</span></div>(这没问题)但若外面是Article,而author只写了文本没开新 scope,就丢失作者结构
常见漏点:LocalBusiness 的 address 是 PostalAddress 类型,不是字符串;Event 的 performer 是 Person 或 Organization,不能直接写名字。
验证时注意 itemtype URL 是否可访问且返回 200
Google Structured Data Testing Tool 和 Rich Results Test 不仅校验格式,还会尝试 HTTP 请求该 itemtype URL。如果服务器返回 404、重定向、或非 HTML 内容(比如 JSON-LD),部分工具会警告或降权处理。
- ✅ 可接受:
https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937Person(返回 HTML 页面,状态码 200) - ❌ 风险项:
https://example.com/my-person-type(即使内容合法,若不可达或超时,结构化数据可能被丢弃) - ⚠️ 注意:
https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937后缀大小写敏感,https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937person是 404
最稳妥的做法:始终从 https://www.php.cn/link/b8eadb229854b2add23d0371cc31b937 官网点击进入具体类型页,复制地址栏完整 URL —— 不手敲、不拼接、不改写。



















