Skip to content
Skillpedia
SEO75k · #3061

trailing-slash

What it does

This skill checks whether a site uses one consistent URL style, with or without a final slash. It is for site owners and developers who want to avoid duplicate pages in search.

When to use it

  • ✓When a site serves the same page at both an address with and without a trailing slash.
  • ✓When internal links, sitemap entries and canonical tags use different URL styles.
  • ✓When a site has moved to a new platform and its URL rules may have changed.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/trailing-slash/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Google shows some of my pages twice, once with a slash at the end and once without. Can you fix the URLs?”

5 new skills a week. 1 minute to read.

How it works

The agent tests both URL versions and checks internal links and sitemaps. It then recommends one preferred style, with permanent redirects from the other.

Technical content (original SKILL.md)

Original text by the author, straight from 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

FAQ

Why are the two URLs treated as different?

By default, search engines see /page and /page/ as separate addresses, which splits ranking signals.

How are the duplicates resolved?

The skill recommends 301 redirects from the non-preferred version, and canonical tags on the pages.

Should I update my sitemap too?

Yes. The skill says sitemap entries should use the same format as the preferred URL.

Details

Original description by the author

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

Popularity

GitHub stars
75k
Ranking position
#3061
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills