Trailing slash and duplicate URLs
A trailing slash can make /page and /page/ two distinct URLs serving the same content, creating duplication. Servers and frameworks differ in how they treat the slash, so the fix is to choose one form, 301-redirect the other to it, and keep links, sitemaps, and canonicals consistent.
Why trailing slashes cause duplicates
For most paths, a trailing slash changes the URL: /page and /page/ are different addresses. Whether they serve the same content depends on the server or framework — some normalise automatically, some serve both, some treat the slash as a directory boundary. Where both forms return 200 with the same content, the page is duplicated from a crawler's perspective.
The exception is the root URL, where the trailing slash is not optional in the same way; the issue is mainly about paths below it.
How to fix it
Pick one canonical form — with or without the trailing slash — and apply it site-wide. Configure the server to 301-redirect the non-canonical form to the canonical one, so /page/ and /page resolve to a single URL. Make internal links and sitemap entries use the canonical form, and set self-referential canonical tags accordingly.
Be careful that the redirect rule does not create loops (slash to no-slash to slash) or chains. Test representative URLs after changing the rule, including paths that look like files versus directories.
- Choose one form: trailing slash or no trailing slash
- 301-redirect the other form to the canonical one
- Align links, sitemap, and canonical tags; avoid loops
Operator checklist
Decide on a slash convention and enforce it. Confirm the non-canonical form 301-redirects without creating a loop. Check links and sitemap entries use the canonical form. Verify canonical tags match, and test a sample of URLs to confirm single-hop resolution.
How it appears in analytics and logs
When both /page and /page/ return the same content with a 200, crawlers see two URLs for one page, splitting signals. Redirecting to a single canonical form and aligning references tells crawlers which URL is authoritative.
Diagnostic use case
Resolve trailing-slash duplication by picking one URL form and redirecting and referencing it consistently across the site.
What WebmasterID can help detect
WebmasterID can show whether crawlers reach both slashed and unslashed variants and whether one redirects to the other, helping you confirm trailing-slash canonicalization.
Common mistakes
- Serving both /page and /page/ with 200 and no redirect.
- A redirect rule that loops between slashed and unslashed forms.
- Linking internally to the non-canonical slash form.
Privacy and accuracy notes
Trailing-slash handling concerns URL form and redirects, not personal data. WebmasterID reports these patterns for crawler traffic without exposing individual visitors.
Related pages
- www vs non-www canonicalization
To a crawler, https://www.example.com and https://example.com are distinct URLs that can serve the same content, creating duplication. The fix is to choose one canonical host, redirect the other to it with a 301, and keep internal links, sitemaps, and canonical tags consistent with the chosen version.
- Duplicate content diagnosis
Duplicate content is the same or very similar content available at multiple URLs. It is not a penalty — Google says so — but it does split signals and waste crawl budget, and search engines must pick one URL to show. Canonical tags, consistent linking, and parameter handling consolidate duplicates onto a preferred URL.
- Website observability
See whether crawlers reach both slash variants of your URLs.
Sources and verification notes
- Google Search Central — Canonicalization and duplicate URLsDocuments consolidating duplicate URLs, including form variants.
- MDN — 301 Moved Permanently
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.