本文へスキップ
Skillpedia
SEO対策75k · #3061

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/trailing-slash/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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 /page must 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.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#3061
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル