百度 / 谷歌 会同时抓取 PC 和 M 站
它们会发现:PC 内容 ≠ 移动内容
并且没有做 配对标注
→ 搜索引擎会认为你没有适配移动,甚至判定为重复站点、恶意跳转
真正 SEO 最友好的结构 = 服务器跳转 + 配对标签 一起用
正确组合(行业标准)
PC 站:.htaccess 跳转(手机自动去 m 站)
PC 站 + M 站:互相加配对 meta/link 标签
M 站:不加任何跳转规则
这样才是:
既对用户友好(快跳),又对 SEO 友好(告诉搜索引擎这是同一内容的移动版)
你需要在 PC 页头部加这 2 行(必加!)
html
预览
<meta name="mobile-agent" content="format=html5; url=https://m.why80.com[!--titleurl--]">
<link rel="alternate" media="only screen and (max-width:640px)" href="https://m.why80.com[!--titleurl--]">
同时在 M 页头部加这 1 行(必加!)
html
预览
<link rel="canonical" href="https://www.zhhihu.com[!--titleurl--]">
这样才叫「SEO 最友好」
告诉搜索引擎:
PC 版 = www.why80.com/xxx
移动版 = m.why80.com/xxx
是同一篇内容,不是两个站。
手机用户依然最快跳转
蜘蛛爬 PC → 看到标签 → 知道对应 M 址
蜘蛛爬 M → 看到 canonical → 知道权威版是 PC
不会被判无移动适配,不会降权
最终最稳方案总结
PC 站 .htaccess 加跳转(手机自动跳 m)
PC 页头加 alternate + mobile-agent
M 页头加 canonical 指向 PC
M 站不加任何跳转
这就是 大网站都在用的标准双站 SEO 方案,安全、稳定、排名友好。
以帝国 CMS + PC / 移动双站分离 为例子
最标准、SEO 最友好、不会被判定违规的完整标签方案,直接复制到对应模板头部即可,不用改任何代码。
一、PC 站头部模板(所有页面都加)
放在 <head> 里面:
html
预览
<!-- 移动站配对标签:SEO 必须 -->
<meta name="mobile-agent" content="format=html5; url=https://m.zhhihu.com[!--titleurl--]">
<link rel="alternate" media="only screen and (max-width=640px)" href="https://m.zhhihu.com[!--titleurl--]">
<!-- 禁止M站再跳转回来,防止循环 -->
<meta name="applicable-device" content="pc">
作用:
✅ 告诉百度 / 谷歌:这篇有对应的移动版
✅ 不会被判 “无移动适配”
✅ 不会被判 “恶意跳转”
✅ 权重正常传递
二、M 手机站头部模板(所有页面都加)
<!-- 声明对应PC版,权威链接指向PC,SEO核心 -->
<link rel="canonical" href="https://www.zhhihu.com[!--titleurl--]">
<!-- 声明是移动页,禁止再跳转 -->
<meta name="applicable-device" content="mobile">
作用:
✅ 告诉搜索引擎:这是移动版,不是重复内容
✅ 权重集中到 PC 站
✅ 不会出现双站互相竞争关键词
三、最终最稳结构(行业通用标准)
PC 站
.htaccess 跳转:手机 → m.zhhihu.com
头部加 alternate + mobile-agent
M 站
不加任何跳转规则
头部加 canonical 指向 PC
结果
手机访问秒跳,体验极好
蜘蛛正常抓取,不跳
SEO 满分,不会降权
无循环跳转
四、你的 .htaccess 最终版(只放 PC 站)
apache
RewriteEngine On
# 手机 UA
RewriteCond %{HTTP_USER_AGENT} (android|iphone|ipod|ipad|mobile|windows\s*phone) [NC]
# 排除电脑系统
RewriteCond %{HTTP_USER_AGENT} !(windows\s*nt|macintosh|linux|x11|cros) [NC]
# 排除搜索引擎蜘蛛(SEO关键)
RewriteCond %{HTTP_USER_AGENT} !(bot|spider|crawler|google|baidu|sogou|360|bing|yahoo|yandex) [NC]
# 跳转到HTTPS移动站
RewriteRule ^(.*)$ https://m.zhhihu.com$1 [L,R=302]
——你觉得行吗?说说你的看法。
