sitemap-4xx
它能做什么
这个技能检查站点地图中列出的每个网址,找出返回 404 或 410 等错误代码的网址。它面向长期删除或移动过页面的网站所有者。
适用场景
- ✓你请智能体检查站点地图中是否有返回错误的页面的时候。
- ✓网站改动后,Search Console 报告站点地图中有错误的时候。
- ✓你删除或移动了内容,需要让站点地图与线上实际内容一致的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/sitemap-4xx/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的站点地图列出了一些现在返回错误的页面。请帮我检查每个网址并清理吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会获取站点地图中的每个网址,并记录其状态码。对于已移动的页面,它会建议使用 301 重定向并给出新地址;对于已不存在的页面,它会建议返回 410 并将其从站点地图中移除。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
4XX Pages in Sitemap
Including 4XX URLs in a sitemap signals poor site maintenance to Google, wastes crawl budget on non-existent pages, and generates errors in Search Console that can mask real indexing issues.
Quick Reference
- Sitemaps should only contain URLs that return HTTP 200 and are indexable
- 4XX URLs in a sitemap waste crawl budget and cause Search Console errors
- Remove 404 pages from the sitemap or set up proper 301 redirects before adding them
- Monitor the sitemap regularly — deleted content must be removed from sitemaps promptly
Check
Fetch all URLs listed in the sitemap and record their HTTP status codes. Flag any URL returning 4XX (404 Not Found, 410 Gone, 403 Forbidden). Cross-reference against Google Search Console → Coverage for corroborating data.
Fix
For each 4XX URL: if the content moved, set up a 301 redirect to the new URL and add the new URL to the sitemap. If the content is permanently gone, return 410 Gone and remove the URL from the sitemap. Regenerate and resubmit the sitemap.
Explain
Explain why sitemaps must only contain live, indexable URLs, how 4XX URLs in sitemaps affect crawl budget allocation, and the difference between 404 and 410 status codes for deindexing.
Code Review
Review metadata generation, rendered HTML, structured data, and response headers related to 4XX Pages in Sitemap. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/sitemap-4xx
常见问题
站点地图中的错误页面为什么重要?
这个技能说,它们会浪费抓取资源,并在 Search Console 中产生错误,可能掩盖真正的索引问题。
404 和 410 有什么区别?
这个技能说,410 Gone 表示内容是被有意删除的,这有助于搜索引擎将其移除。
应该定期检查站点地图吗?
应该。这个技能建议对其进行监控,因为已删除的内容应及时从站点地图中移除。
详情
作者的原始描述
Use when applies to any site with a dynamically generated or manually maintained XML sitemap. Use when investigating crawl errors or after a site migration that removed pages.
热度
- GitHub 星标
- 75k
- 排名
- #3020
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。