跳到正文
Skillpedia
网站与界面(前端)75k · #2706

404-page

它能做什么

这项技能检查为无效地址显示的页面是否设置得当,并提供帮助访客找回内容的链接。适合希望迷路的访客能够找回方向、而不是离开的网站团队。

适用场景

  • ✓当你正在构建或审查用于失效或已迁移链接的页面时。
  • ✓当网站显示了带品牌的缺失页面,却返回 200 状态码时。
  • ✓当你希望在未找到页面中加入搜索和热门链接时。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/404-page/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

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

可以这样问 AI

“请检查我网站的缺失页面是否返回真正的 404 状态,并提供有用的链接。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会审查页面模板和最终 HTML,确认页面提供导航选项,并且服务器返回真正的 404 代码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Create a custom 404 error page

A generic browser 404 page causes users to leave immediately—a well-designed custom page provides recovery paths and keeps users engaged with your site.

Quick Reference

  • Custom 404 pages retain users who encounter broken or moved links
  • Include search, navigation, and links to popular content
  • Maintain consistent branding and site design
  • Track 404 errors to identify and fix broken links
  • Return a real HTTP 404 so the page is not treated as a soft 404

Check

Verify that this website has a custom 404 error page with helpful navigation options. Confirm the route returns HTTP 404 and not a branded page with a 200 response.

Fix

Create a user-friendly 404 page with search functionality and links to important pages. Ensure the server or framework returns status code 404 so the page does not become a soft 404.

Explain

Explain how custom 404 pages help retain users who encounter broken links and why returning 200 for missing pages creates soft-404 indexing problems.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Create a custom 404 error page. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/html/404-page

常见问题

为什么状态码很重要?

如果缺失页面返回 200,搜索引擎可能会把它当作真实页面,从而导致索引问题。

页面应该包含什么?

这项技能建议在页面中加入搜索、导航,以及指向热门内容的链接,并与网站风格保持一致。

它会追踪失效链接吗?

这项技能建议追踪 404 错误,以便你找到并修复失效链接。

详情

作者的原始描述

Use when reviewing templates, rendered HTML, or shared components related to Create a custom 404 error page. Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能