跳到正文
Skillpedia
SEO75k · #3030

special-chars

它能做什么

这个技能检查网址路径中的空格、符号和非英文字符,找出导致抓取问题或产生重复地址的情况。它面向内容系统自动生成大量地址的网站所有者和开发者。

适用场景

  • ✓你请智能体检查网址中是否有空格或异常符号的时候。
  • ✓同一页面以多个编码后的地址出现的时候。
  • ✓你的内容系统从其他语言的标题生成地址的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“我的一些页面地址中有空格和符号,我认为它们造成了重复。请帮我检查并清理吗?”

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

工作原理

智能体会扫描网址路径中安全字符集以外的字符,并标出空格、保留符号以及未经编码的非英文字母。它会更新网址生成规则,将空格替换为连字符,并从旧地址设置重定向。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

URL Special Characters

Special characters in URL paths cause inconsistent crawling, broken links when shared, and canonicalization failures when different systems encode them differently.

Quick Reference

  • URL paths should contain only unreserved characters: A-Z, a-z, 0-9, -, _, ., ~
  • Spaces must be encoded as %20 (not +, which is query-string syntax)
  • Characters like #, ?, &, = have reserved meaning in URLs and must be percent-encoded in path segments
  • Non-ASCII characters (accented letters, CJK) should be percent-encoded in URLs, though modern browsers decode them for display

Check

Scan all crawled URL paths for characters outside [A-Za-z0-9\-_./~]. Flag URLs containing spaces (%20 or literal), special symbols (#, ?, &, =, + in paths), or unencoded non-ASCII characters. Check if different encodings of the same URL return separate 200 responses.

Fix

Update the URL generation logic in your CMS or framework to strip or replace special characters. Replace spaces with hyphens. Percent-encode any reserved characters that must appear in paths. Set up redirects from problematic old URLs to clean new slugs.

Explain

Explain the difference between reserved and unreserved characters in RFC 3986, how browsers and crawlers handle inconsistent percent-encoding, and why special characters in paths create duplicate content risks.

Code Review

Review metadata generation, rendered HTML, structured data, and response headers related to URL Special Characters. 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/special-chars

常见问题

为什么空格在网址中是个问题?

这个技能说,空格必须编码为 %20,而编码不一致可能会产生重复页面。

非英文字母必须删除吗?

不必。这个技能说,它们应进行百分号编码,不过现代浏览器也能正确显示它们。

我需要设置重定向吗?

需要。这个技能建议从有问题的旧网址重定向到干净的新网址。

详情

作者的原始描述

Use when applies to any site with user-generated slugs, CMS-generated URLs, or content in non-English languages. Use when auditing URLs for crawl errors or canonicalization issues.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能