跳到正文
Skillpedia
SEO75k · #3020

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/sitemap-4xx/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#3020
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能