泰州网络公司 浏览次数:0 发布时间:2026-03-09
Geo 优化中的 Schema 标签写法核心是:选对类型 + 填全 Geo 核心字段 + 遵循标准化格式,优先使用搜索引擎推荐的JSON-LD格式(易维护、不影响页面结构)。下面按「通用场景 + 细分场景」给出可直接复制的模板,附详细说明和避坑要点,新手也能直接用。
一、先明确核心规则(写之前必看)
- 格式选择:优先用
JSON-LD(<script type="application/ld+json">包裹),而非微数据 / RDFa,谷歌 / 百度都推荐这种方式;
- 核心原则:字段必须真实、和线下 / 地图平台一致(比如地址、电话、经纬度),虚假信息会直接失效;
- 验证工具:写完一定要验证(谷歌:Rich Results Test;百度:结构化数据测试工具)。
二、不同场景的 Schema 写法(可直接复制修改)
场景 1:本地实体商家(核心场景,如门店、健身房、便利店)
这是 Geo 优化常用的类型(LocalBusiness),覆盖 90% 的线下商家 Geo 需求,核心是标注「地址 + 经纬度 + 基础信息」。
html
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg>预览
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <!-- 本地商家Geo Schema模板(JSON-LD格式) -->
<script type="application/ld+json">
{
"@context": "https://schema.org", // 固定值,指向Schema标准库
"@type": "LocalBusiness", // 核心类型:本地商家
"name": "XX健身房(上海静安店)", // 必填:商家完整名称(和地图一致)
"telephone": "021-12345678", // 必填:联系电话(带区号)
"address": { // 必填:完整地址(Geo核心字段1)
"@type": "PostalAddress",
"streetAddress": "上海市静安区南京西路1266号恒隆广场45层", // 街道+门牌号
"addressLocality": "上海市", // 城市
"addressRegion": "静安区", // 行政区
"postalCode": "200040", // 邮编(可选但推荐)
"addressCountry": "CN" // 国家代码(中国填CN,不是“中国”)
},
"geo": { // 必填:地理坐标(Geo核心字段2)
"@type": "GeoCoordinates",
"latitude": 31.227763, // 纬度(精准到6位小数)
"longitude": 121.456789 // 经度(精准到6位小数)
},
"openingHours": [ // 可选但推荐:营业时间(格式严格)
"Mo-Fr 09:00-22:00", // 周一至周五 09:00-22:00
"Sa-Su 10:00-22:30" // 周六至周日 10:00-22:30
],
"priceRange": "¥¥", // 可选:价格区间(¥/¥¥/¥¥¥)
"url": "https://你的域名/静安店.html" // 可选:该门店的专属URL
}
</script>
关键字段解释:
geo(经纬度):Geo 优化的核心!需用工具精准拾取(推荐高德地图拾取工具:https://lbs.amap.com/console/show/picker),不要手动估算;
openingHours:格式必须是「星期缩写 - 星期缩写 时:分 - 时:分」,星期缩写:Mo (一)、Tu (二)、We (三)、Th (四)、Fr (五)、Sa (六)、Su (日);
addressCountry:必须填两位国家代码(CN),而非中文 “中国”,否则搜索引擎识别失败。
场景 2:内容型页面(如旅游攻略、本地资讯中的地理信息)
如果你的页面是文章(比如 “北京故宫游玩攻略”),需要标注文中提到的地理点位,用Place类型(聚焦地理信息,而非商家):
html
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg>预览
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <!-- 内容页面的Geo Schema模板 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Place", // 核心类型:地理点位
"name": "北京故宫", // 地理点位名称
"address": {
"@type": "PostalAddress",
"streetAddress": "北京市东城区景山前街4号",
"addressLocality": "北京市",
"addressRegion": "东城区",
"postalCode": "100006",
"addressCountry": "CN"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 39.916527,
"longitude": 116.397128
}
}
</script>
<!-- 进阶:在文章Schema中嵌套地理信息(更贴合内容) -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "2024北京故宫游玩攻略",
"author": {"@type": "Person", "name": "旅游博主"},
"mentions": { // 标注文章提及的地理点位
"@type": "Place",
"name": "北京故宫",
"geo": {
"@type": "GeoCoordinates",
"latitude": 39.916527,
"longitude": 116.397128
}
}
}
</script>
场景 3:细分行业(餐厅、酒店、医院等)
在LocalBusiness基础上,用细分类型(如Restaurant/Hotel),补充行业专属字段,Geo 优化效果更精准:
html
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg>预览
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; line-height: 0px; display: block; flex: 0 1 auto; flex-direction: row; justify-content: normal; align-items: normal; padding: 0px; margin: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);"></svg> <!-- 餐厅专属Geo Schema模板 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Restaurant", // 细分类型(继承LocalBusiness)
"name": "XX川菜馆(朝阳店)",
"telephone": "010-87654321",
"address": {
"@type": "PostalAddress",
"streetAddress": "北京市朝阳区建国路88号",
"addressLocality": "北京市",
"addressRegion": "朝阳区",
"postalCode": "100022",
"addressCountry": "CN"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 39.912345,
"longitude": 116.487654
},
"openingHours": ["Mo-Su 10:00-23:00"],
"servesCuisine": "川菜", // 餐厅专属:菜系
"menu": "https://你的域名/menu.html", // 可选:菜单URL
"priceRange": "¥¥"
}
</script>
三、编写 & 部署步骤(新手照做即可)
- 收集核心信息:
- 基础:商家 / 点位名称、带区号的电话、详细地址(街道 + 门牌号);
- Geo 核心:经纬度(用高德 / 百度地图拾取工具);
- 补充:营业时间、行业专属字段(如酒店的
starRating(星级)、医院的medicalSpecialty(专科))。
- 复制模板修改字段:替换模板中的示例值,注意 JSON 语法(逗号不能漏、字符串用双引号、数组用
[]);
- 嵌入页面:将代码放在页面
<head>标签内,或<body>标签末尾(推荐后者,不影响页面加载);
- 验证并修复:用谷歌 / 百度的测试工具检查,修复 “字段缺失”“格式错误” 等提示(比如营业时间格式不对、经纬度为空);
- 上线后监测:在谷歌搜索控制台 / 百度资源平台查看 “结构化数据” 报告,确认无报错。
四、避坑要点(新手容易错)
- 经纬度不要估算:必须用地图拾取工具,精准到 6 位小数(比如
31.227763,而非31.23);
- 避免重复标记:一个页面只写一个核心 Geo Schema(比如一个门店页面不能同时写 2 个
LocalBusiness);
- 地址要完整:不能只写 “上海市静安区”,必须到门牌号(“上海市静安区南京西路 1266 号”);
- 动态多门店:如果是多门店网站,用后端代码(PHP/Java/Python)读取数据库,动态生成每个门店的 Schema(比如循环填充地址、经纬度)。
总结
- Geo 优化的 Schema 核心是
address(完整地址)+ geo(精准经纬度),这两个字段缺一不可;
- 优先用
JSON-LD格式,本地商家选LocalBusiness类型,内容页面选Place类型,细分行业用专属子类型;
- 写完必须用官方工具验证,确保字段真实、格式规范,否则搜索引擎无法识别。
按上述模板修改后,你的 Geo Schema 就能被搜索引擎精准识别,直接助力 Geo 优化的排名和展示效果。