SEO
Trailing slash or not — pick one and enforce it sitewide
Google treats /page and /page/ as different URLs. Pick one form, redirect the other, self-reference canonical. Here is the decision tree for which to pick.
13 April 2026 · 2 min read
Quick frame: Google treats /page and /page/ as different URLs by default. Pick one form, server-redirect the other, and emit self-referential canonicals. The choice doesn't matter — only that you pick.
The decision tree
| Stack | Default | Recommendation |
|---|---|---|
| WordPress | trailing slash | keep |
| Next.js (App Router) | trailing slash | keep |
| Hugo | trailing slash | keep |
| Astro | no trailing slash | keep |
| Headless CMS + custom front-end | depends | pick based on convention |
The pattern: pick whichever your framework defaults to. Fighting your framework on URL form costs maintenance for negligible benefit.
The three things you must do
1. Redirect the alternate form
Use the .htaccess generator or nginx generator to 301-redirect the non-canonical form. For example, if your canonical is with trailing slash:
RewriteCond %{REQUEST_URI} ^/.+[^/]$
RewriteCond %{REQUEST_URI} !\.[a-z]+$
RewriteRule ^(.*)$ /$1/ [R=301,L]
2. Self-referential canonical
Every page emits a canonical pointing to itself in the chosen form. The canonical tag generator toggle handles trailing-slash normalisation.
3. Normalise URLs across all surfaces
- Sitemap: only the canonical form.
- Internal links: only the canonical form.
- External campaigns: only the canonical form.
For bulk normalisation of an existing URL list, use the trailing slash converter.
The cost of not doing this
- Link equity splits across
/pageand/page/. - Both variants appear in Search Console as separate URLs.
- Social engagement counters fragment.
- Backlinks pointing to one form don't reinforce the other.
Files with extensions
URLs ending in extensions (/file.pdf, /sitemap.xml) should never have trailing slashes. The trailing slash converter respects this.
The companion canonical discussion is in canonical tag mistakes in Indian e-commerce.
FAQ
Q. Is one form genuinely better than the other for SEO? A. No. Google has confirmed neither form ranks better. Consistency matters; the choice doesn't.
Q. What about the homepage — slash or no slash?
A. The homepage always has a single trailing slash (/). It's a special case; both forms (with and without slash) resolve to the same homepage.
Q. Will switching forms hurt rankings? A. Brief wobble (1–2 weeks) as Google re-indexes. Long-term, no impact if redirects are 301 and canonicals are consistent.
Try the free tool
Trailing Slash Converter
Normalise a URL list — add or strip trailing slashes consistently.
Open Trailing Slash Converter →