GlossarySEO
Does a trailing slash matter for SEO?
Also called: trailing slash URL, slash at end of URL
Definition
A trailing slash is the / at the end of a URL path, as in /pricing/. Google treats /pricing and /pricing/ as separate URLs, so pick one form and redirect the other to it.
Trailing slash, explained
Google explained this years ago in a post titled "To slash or not to slash". It treats each URL separately, with or without the slash, even though both often serve the same content. Neither is better for rankings. The only exception is the root: https://example.com and https://example.com/ are equivalent and can't be redirected to each other.
Google's recommendations are simple. Choose one version as preferred. Use it consistently in internal links and the sitemap. 301 redirect the other version to it, and if you can't, use a rel="canonical" pointing at the preferred URL. The convention is to use a trailing slash for directory-style URLs, but it's your choice.
Frameworks usually decide for you. Next.js, for example, redirects /about/ to /about by default and flips that when you set trailingSlash: true. Static hosts may do the opposite, serving about/index.html at /about/. Trouble starts when two layers disagree: the CDN adds a slash, the app strips it, and you get a redirect loop, or both versions return 200.
Check one URL from each page type with and without the slash. You want exactly one 200 and one single-hop permanent redirect. Then make sure canonical tags, the sitemap and internal links all use the same form, so the redirect only catches the odd outside link. Changing the convention later on a live site means redirecting every URL, so decide before launch if you can.
Why it matters for founders
It's a small detail that produces duplicate URLs across your whole site at once. Getting it right early keeps canonicals, sitemaps and analytics clean.
Example
Search Console shows both /blog/launch-guide and /blog/launch-guide/ as indexed. You enable your framework's redirect so the slash version 308s to the clean one, and update two internal links that used the slash.
Common mistakes
- Serving both versions with
200. - CDN and app slash rules that cause redirect loops.
- Canonical tags that disagree with the redirect direction.
- Mixing both forms in internal links and the sitemap.
Sources
- Google Search Central Blog: To slash or not to slash
- Google Search Central: URL structure best practices
Checked
Related terms
- CanonicalizationCanonicalization is how a search engine picks one representative URL from a group of pages with the same or very similar content, and shows only that one in results.
- Redirect chainA redirect chain is when a URL redirects to another URL that redirects again before reaching the final page. Each hop adds delay, and long chains or loops can stop crawlers from reaching the page.
- URL slugA URL slug is the readable part of a URL that identifies a specific page, like
what-is-crawl-budgetin/glossary/what-is-crawl-budget. Good slugs are short, lowercase, hyphenated and descriptive. - Duplicate contentDuplicate content is the same or very similar content available at more than one URL. Google says some duplication is normal and isn't a spam violation; it picks one version to show and filters the rest.