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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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/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
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.
Popularity
- GitHub stars
- 75k
- Ranking position
- #3061
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
competitive-platform-analysis
280kHelps understand your competitors. It identifies, categorizes, and filters competing companies before any deeper analysis.
competitive-report-structure
280kCreates comprehensive competitor reports. It combines information to show the overall landscape, recommendations, and helps align the team.
lead-intelligence
280kHelps your agent find and contact important people. It analyzes leads, suggests approaches, and manages outreach via email and social media.