trailing-slash
できること
このスキルは、サイトが末尾のスラッシュの有無のどちらか一つの形式で統一されているかを確認します。検索での重複ページを避けたいサイト運営者や開発者向けです。
使う場面
- ✓同じページが、末尾にスラッシュのあるアドレスとないアドレスの両方で表示されるとき。
- ✓内部リンク、サイトマップ、canonical タグが異なるURLの形式を使っているとき。
- ✓新しいプラットフォームに移行し、URLのルールが変わったかもしれないとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/trailing-slash/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Google で、一部のページが末尾にスラッシュのあるものとないものの二つで表示されています。URLを直してもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは両方のURLを試し、内部リンクとサイトマップを確認します。そのうえで一つの優先形式を提案し、もう一方からは恒久的なリダイレクトを設定します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Use trailing slashes consistently
Inconsistent trailing slashes create duplicate content — Google sees /page and /page/ as two separate URLs competing for the same ranking, splitting PageRank between them.
Quick Reference
- Pick one convention — trailing slash or no trailing slash — and enforce it site-wide with 301 redirects
- Both
/page/and/pagemust not return HTTP 200; one must redirect to the other - Set
rel="canonical"to the preferred version on all pages - Ensure all internal links, sitemaps, and canonical tags use the same convention
Check
For a sample of URLs, test both the trailing-slash and non-trailing-slash versions. Both should NOT return HTTP 200 — one must 301-redirect to the other. Check that internal links, sitemap <loc> values, and canonical tags all use the same convention consistently.
Fix
Choose a canonical URL convention. Add server or framework redirect rules so the non-preferred variant permanently redirects (301) to the preferred one. Update all internal links, canonical tags, and sitemap entries to use the preferred format.
Explain
Explain why /page and /page/ are treated as distinct URLs by default, how this creates duplicate content, and how 301 redirects and canonical tags resolve the ambiguity.
Code Review
Review metadata generation, rendered HTML, structured data, and response headers related to Use trailing slashes consistently. 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/trailing-slash
よくある質問
二つのURLはなぜ別のものとして扱われるのですか?
初期設定では、検索エンジンが /page と /page/ を別のアドレスとして見るため、ランキングの評価が分散するからです。
重複はどのように解決しますか?
優先しない方から301リダイレクトを設定し、ページには canonical タグを使うことを勧めています。
サイトマップも更新すべきですか?
はい。サイトマップのエントリーは、優先するURLと同じ形式を使うべきだとこのスキルは説明しています。
詳細
作者による元の説明
Use when applies to all static and dynamic websites. Use when auditing a site for duplicate content, setting up a new site, or after migrating platforms that changed URL conventions.
人気
- GitHubのスター
- 75k
- ランキング
- #3061
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
competitive-platform-analysis
280k競合他社を把握するのに役立ちます。より深い分析を行う前に、競合企業を特定し、分類し、絞り込みます。
competitive-report-structure
280k包括的な競合レポートを作成します。情報をまとめて業界全体の状況や提言を示し、チームの認識をそろえるのに役立ちます。
lead-intelligence
280kエージェントが重要な人物を見つけて連絡を取るのを支援します。見込み客を分析し、アプローチを提案し、メールやSNSを通じたアウトリーチを管理します。