Files
SEONexus/docs/old-tmp-seo/41-老模板SEO代码优化清单-2026-04-19.md
Your Name e8688443e5 debug
2026-04-19 13:49:04 +08:00

384 lines
11 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 41-老模板 SEO 代码优化清单 - 2026-04-19
## 目的
这份文档只回答一个问题:
- 针对老模板 `1001-1005`
- 基于 `2026-04-19` 的蜘蛛日志和当前模板代码
- 现在到底还需不需要继续优化代码
结论先说:
> 需要,而且值得继续优化;但不是大改,而是围绕“入口层、分类层、规范 URL 承接”做一轮精确收口。
---
## 一、为什么今天仍建议继续改代码
今天 `24h workbench 聚合` 的关键信号是:
- `detail_requests = 19`
- `play_requests = 9`
- `category_requests = 0`
- `sitemap_requests = 0`
- `301 = 23`
- `500 = 0`
这说明:
1. 老模板不是不可抓
2. 深页不是完全失效
3. 当前主问题也不是服务端报错
4. 现在最值得改的代码,不是功能代码,而是 SEO 入口与规范化代码
换句话说:
- 现在不是“要不要改代码”的问题
- 而是“要改哪些 SEO 相关代码,才能把蜘蛛从首页/旧深链回访,推进到分类层与规范深页”
---
## 二、建议优先级
### P0应尽快改
1. `sitemap_index.xml` 仍残留小说模板输出
2. 首页缺少显式 canonical
3. 首页与分类页 JSON-LD 结构存在明显不规范问题
### P1建议继续改
1. 分类页加强内部链接和分页信号
2. 详情页进一步减少旧 family 跳转预算消耗
3. `www / 裸域``http / https` 规范落点继续压缩
### P2可排到后面
1. 首页结构化数据的丰富度提升
2. 分类页的 schema 精修
3. 搜索页、地图页的补充规范化
---
## 三、P0 清单
## 1. `sitemap_index.xml` 仍保留小说时代 sitemap 输出
### 现象
5 套老模板里,`sitemap_index.xml` 仍在输出这些链接:
- `sitemap-books-*.xml`
- `sitemap-books-catalog-*.xml`
- `sitemap-chapters-*.xml`
- 并且 `loc` 仍强制写成 `https://www.{$DomainModel->d_domain}/...`
### 影响
这和当前视频站实际结构不一致,也和我们前面已经修过的 `sitemap-main.xml` 思路不一致。
直接后果是:
1. sitemap 入口不纯净
2. 蜘蛛难以把 sitemap 当成视频站核心入口
3. 也解释了今天 `sitemap_requests = 0` 依然没有起来
### 涉及文件
- [sitemap_index.xml](/www/wwwroot/VideoSource2/code/app/home/view/videoDadi/sitemap/sitemap_index.xml:1)
- [sitemap_index.xml](/www/wwwroot/VideoSource2/code/app/home/view/videoDingZhu/sitemap/sitemap_index.xml:1)
- [sitemap_index.xml](/www/wwwroot/VideoSource2/code/app/home/view/videoBoKu/sitemap/sitemap_index.xml:1)
- [sitemap_index.xml](/www/wwwroot/VideoSource2/code/app/home/view/videoLaoNiu/sitemap/sitemap_index.xml:1)
- [sitemap_index.xml](/www/wwwroot/VideoSource2/code/app/home/view/videoNuNu/sitemap/sitemap_index.xml:1)
### 建议改法
1. 去掉小说遗留的 `books / books-catalog / chapters`
2. 只保留当前视频站真实存在、且值得蜘蛛消费的 sitemap 组
3. `loc` 统一改为 `https://{$DomainModel->d_domain}/...`
4. 确保 sitemap index 与 `robots.txt``sitemap-main.xml` 的 host 完全一致
### 价值判断
- 这是当前最值得做的代码优化之一
- 因为它直接对应今天最明显的偏差:`sitemap_requests = 0`
---
## 2. 首页缺少显式 canonical
### 现象
5 套老模板首页 `index/index.html` 里当前有:
- `og:url`
- `WebSite / VideoObject / CollectionPage` JSON-LD
但没有显式:
- `<link rel="canonical" href="https://{$DomainModel->d_domain}">`
### 涉及文件
- [index/index.html](/www/wwwroot/VideoSource2/code/app/home/view/videoDadi/index/index.html:1)
- [index/index.html](/www/wwwroot/VideoSource2/code/app/home/view/videoDingZhu/index/index.html:1)
- [index/index.html](/www/wwwroot/VideoSource2/code/app/home/view/videoBoKu/index/index.html:1)
- [index/index.html](/www/wwwroot/VideoSource2/code/app/home/view/videoLaoNiu/index/index.html:1)
- [index/index.html](/www/wwwroot/VideoSource2/code/app/home/view/videoNuNu/index/index.html:1)
### 影响
现在日志里首页仍是主入口层,首页 canonical 不显式,会放大下面几类问题:
1. `www / 裸域` 归一不够强
2. `http / https` 归一依赖跳转而不是模板信号
3. 首页作为站点主入口时,规范主 URL 提示不够直接
### 建议改法
在 5 套首页统一补:
```html
<link rel="canonical" href="https://{$DomainModel->d_domain}" />
```
### 价值判断
- 这项改动小
- 风险低
- 对入口层规范化有直接帮助
---
## 3. 首页 JSON-LD 存在明显 schema 不规范问题
### 现象
5 套首页模板里,当前存在几类明显问题:
1. 缺少或混乱的 `@context`
2. `@type: "Movies"` 不是规范 schema 类型
3. `ListItem{$Video.v_id}` 这类动态拼接类型不合法
4. `AggregateRating` 只有 `ratingValue`,结构不完整
5. 多处循环尾逗号风险较高,容易导致最终 JSON-LD 非严格合法
### 涉及文件
- [videoDadi 首页](/www/wwwroot/VideoSource2/code/app/home/view/videoDadi/index/index.html:20)
- [videoDingZhu 首页](/www/wwwroot/VideoSource2/code/app/home/view/videoDingZhu/index/index.html:20)
- [videoBoKu 首页](/www/wwwroot/VideoSource2/code/app/home/view/videoBoKu/index/index.html:20)
- [videoLaoNiu 首页](/www/wwwroot/VideoSource2/code/app/home/view/videoLaoNiu/index/index.html:20)
- [videoNuNu 首页](/www/wwwroot/VideoSource2/code/app/home/view/videoNuNu/index/index.html:20)
### 影响
这不会一定导致页面无法收录,但会削弱搜索引擎对首页内容结构的理解,尤其是在我们现在希望:
1. 首页更稳做入口
2. 首页把蜘蛛继续往分类和深页送
的阶段,这些噪音没必要继续留着。
### 建议改法
1. 首页 JSON-LD 统一只保留一套稳定结构:
- `WebSite`
- `CollectionPage`
- 必要时保留一个 `ItemList`
2. 删除非标准 `Movies`
3. 删除 `ListItem{$Video.v_id}` 这种非法 `@type`
4. 避免模板循环拼出非法 JSON
5. `AggregateRating` 要么补全,要么先删除,避免半截 schema
### 价值判断
- 这是值得做的
- 但建议按“收敛、简化、合法化”的思路改,不要越改越复杂
---
## 4. 分类页 JSON-LD 也存在合法性风险
### 现象
5 套 `getCategoryType.html` 目前虽然已经补了:
- `meta robots`
- `canonical`
- `og:url`
但 JSON-LD 里依然存在明显风险:
1. `potentialAction` 后缺少逗号再接 `hasPart`
2. `hasPart` 中列表项循环尾逗号风险较大
3. 末尾整体数组结构也不够稳
### 涉及文件
- [videoDadi 分类页](/www/wwwroot/VideoSource2/code/app/home/view/videoDadi/video/getCategoryType.html:40)
- [videoDingZhu 分类页](/www/wwwroot/VideoSource2/code/app/home/view/videoDingZhu/video/getCategoryType.html:40)
- [videoBoKu 分类页](/www/wwwroot/VideoSource2/code/app/home/view/videoBoKu/video/getCategoryType.html:40)
- [videoLaoNiu 分类页](/www/wwwroot/VideoSource2/code/app/home/view/videoLaoNiu/video/getCategoryType.html:40)
- [videoNuNu 分类页](/www/wwwroot/VideoSource2/code/app/home/view/videoNuNu/video/getCategoryType.html:40)
### 影响
这类问题正好对应今天最大的缺口:
- `category_requests = 0`
分类页不是没有规范化动作,而是“技术上有了,但信号质量还不够干净”。
### 建议改法
1. 重写分类页 JSON-LD优先保证合法
2. 结构收敛到:
- `CollectionPage`
- `BreadcrumbList`
3. 不要在分类页堆太多 `VideoObject`
4. 把分类页 schema 的重点放在:
- 页面 URL
- 页面主题
- 面包屑
- 当前分类名
### 价值判断
- 这项建议做
- 因为当前分类层完全没起量,分类页信号质量还需要继续打磨
---
## 四、P1 清单
## 5. 首页到分类页的内部链接强度还可以继续增强
### 现象
首页虽然通过 `video-panel` 有分类块,但当前更偏展示,不够像一个明显的蜘蛛入口导航层。
### 涉及文件
- [videoDingZhu 首页模块](/www/wwwroot/VideoSource2/code/app/home/view/videoDingZhu/public/video-panel.html:1)
- [videoBoKu 首页模块](/www/wwwroot/VideoSource2/code/app/home/view/videoBoKu/public/video-panel.html:1)
- 对应其他 3 套老模板同类文件
### 建议改法
1. 首页头部或主视觉下方增加更明确的一级分类入口组
2. 每个一级分类块保证能直接点到规范分类 URL
3. 分类入口文案不要只写“更多”,可以带上类目名
4. 让首页更像“站点入口页”,而不是纯内容流
### 价值判断
- 对“把蜘蛛从首页送到分类层”非常有帮助
- 但比 sitemap/index/schema 收口稍低一个优先级
---
## 6. `yagyjt.com` 这类站仍在消耗旧 family 的 301 预算
### 现象
今天 `yagyjt.com`
- `200 = 11`
- `301 = 11`
说明旧 family 到规范 family 的单跳虽然存在,但百度还在大量请求旧 URL。
### 当前已知情况
我们之前已经修过:
1. 播放页 `og:url`
2. 播放页 JSON-LD `url`
3. 分类页 canonical
4. 分类页 `og:url`
5. `sitemap-main.xml`
### 现在仍建议继续看哪里
1. 首页模块里是否还有旧 family 内链
2. 相关推荐、榜单、广告位跳转是否全部指向规范 family
3. 详情页正文、演员、导演、相关推荐区域是否仍间接把蜘蛛带回旧 family
### 涉及文件
- [videoDingZhu 详情页](/www/wwwroot/VideoSource2/code/app/home/view/videoDingZhu/video/getVideoInfo.html:1)
- [videoDingZhu 首页](/www/wwwroot/VideoSource2/code/app/home/view/videoDingZhu/index/index.html:1)
- 以及同模板下 `public/` 内各类列表卡片 partial
### 价值判断
- 这项要继续排查
- 因为它直接对应今天 `301` 仍高的问题
---
## 7. `www.ningxiaowei.com` 规范详情链还可以继续压短
### 现象
今天 `www.ningxiaowei.com`
- `detail = 6`
- `301 = 3`
- `200 = 3`
说明 `/video-info/...` family 是对的,但仍没有彻底压缩到唯一规范落点。
### 建议改法
1. 再核对详情页 canonical 输出条件
2. 再核对页面内详情链接是否 100% 指向最终规范 URL
3. 再核对域名归一与协议归一是否在入口层就结束
### 涉及文件
- [videoBoKu 详情页](/www/wwwroot/VideoSource2/code/app/home/view/videoBoKu/video/getVideoInfo.html:1)
- [videoBoKu 播放页](/www/wwwroot/VideoSource2/code/app/home/view/videoBoKu/video/getVideoPlayUrl.html:1)
- [videoBoKu 首页](/www/wwwroot/VideoSource2/code/app/home/view/videoBoKu/index/index.html:1)
### 价值判断
- 值得做
- 但优先级略低于 sitemap/index/schema 收口
---
## 五、暂时不建议做的大动作
1. 不建议把 GPT 模板思路混进老模板
2. 不建议直接大改前端结构或 UI
3. 不建议因为今天 `category=0` 就重写整个分类系统
4. 不建议在没有更多证据前去大动缓存层逻辑
5. 不建议只为了“看起来更 SEO”而堆更多 schema
当前更合理的动作是:
- 让 sitemap 更干净
- 让首页更规范
- 让分类页更合法
- 让内部链接更少绕旧 family
---
## 六、建议执行顺序
如果下一步要由主 Codex 真正开改,推荐顺序是:
1. 先统一修 5 套 `sitemap_index.xml`
2. 再统一补 5 套首页 canonical
3. 再统一重构 5 套首页 JSON-LD
4. 再统一重构 5 套分类页 JSON-LD
5. 最后按样板站继续排查内部链接对旧 family 的消耗
---
## 七、一句话结论
> 针对老模板 `1001-1005`,今天的 SEO 日志已经足够说明“还需要继续优化代码”,但重点不是功能层,而是 sitemap 入口、首页 canonical、首页/分类页 schema 合法性,以及减少旧 family 301 消耗这 4 个方向。