Trailing Slash SEO
A trailing slash is the forward slash at the end of a URL path, and in SEO you should pick one version and use it everywhere to avoid duplicate content.
Key facts
- A trailing slash is the "/" character at the end of a URL.
- Google treats domain.com and domain.com/ as the same URL.
- For non-root URLs, slash and no-slash versions can be treated as separate URLs.
- Google recommends choosing one preferred format and redirecting the other with a 301.
Use it for
preventing duplicate URL variants
Applies to
Google / Bing / all search engines
How Trailing Slashes Affect Duplicate Content
If you use both https://example.com/page/ and https://example.com/page, Google may see them as two separate URLs. This can split link equity and confuse indexing.
The safest fix is a how 301 redirect works from the non-preferred version to the preferred one. If redirects aren't possible, a canonical tag is a fallback, but Google still prefers redirects first.
Inconsistent internal linking makes the problem worse. Every internal link should point to the same format. See our internal linking seo entry for more on consistency.
- Use 301 redirects to consolidate the duplicate.
- Keep internal links consistent.
- List only the preferred version in your XML sitemap.
Common Trailing Slash Mistakes and Their Consequences
Mixing slash and no-slash versions in internal links is the most frequent error. It tells Google the site is inconsistent and can cause crawling inefficiency.
Another mistake is listing both URL versions in the XML sitemap. This signals that both are canonical, which contradicts your redirect strategy.
Relying on canonical tags alone when a sitewide 301 redirect would be cleaner is also risky. Canonicals are hints, not directives, and Google may ignore them.
- Mixing slash and no-slash in internal links splits link equity.
- Listing both versions in the sitemap confuses Google.
- Using only canonicals instead of redirects leaves duplicates unresolved.
When Trailing Slashes Matter for Site Migrations
During a site migration, trailing slash consistency is critical. If you change your URL structure, you must map old slash and no-slash versions to the new preferred format.
A domain forwarding seo setup also needs attention. If you forward a domain, ensure the target URL uses your chosen trailing slash format.
For more on redirects, see our 301 seo entry. And if you're using meta refresh redirects, check Meta Refresh SEO for why they're not ideal.
Best Practices for Trailing Slash SEO
Pick one format — slash or no-slash — and enforce it sitewide. Use 301 redirects from the duplicate to the preferred version.
Make sure your SEO Friendly URL structure is clean and readable. The trailing slash is just one part of a good URL.
Test your setup with a crawler to confirm no duplicate variants remain. Consistency is the only rule that matters.
- Choose one format and stick to it.
- Use 301 redirects for the duplicate.
- Align internal links, sitemaps, and canonicals.
Common mistakes
- Mixing slash and no-slash in internal links Splits link equity and confuses Google.
- Listing both URL versions in the XML sitemap Signals both as canonical, contradicting redirects.
- Relying only on canonicals instead of redirects Canonicals are hints; Google may ignore them.
Questions
What is the best practice for trailing slashes in URLs?
Pick one format — slash or no-slash — and use it consistently across your site. Use 301 redirects from the duplicate version to the preferred one.
Does a trailing slash affect SEO rankings?
No, the slash itself does not affect rankings. The problem is inconsistency, which can create duplicate content and split link equity.
Should I use a trailing slash or not for my homepage?
Google treats domain.com and domain.com/ as the same URL, so it doesn't matter for the homepage. For other pages, pick one format and stick to it.
See also
- Canonical TagA canonical tag is an HTML element that tells search engines which URL is the master version wh…
- Duplicate ContentDuplicate content is the same or very similar content that appears at more than one URL.
- Crawl BudgetCrawl budget is the number of pages Google can and wants to crawl on your site within a given p…
- Canonical URLA canonical URL is the preferred web address you want search engines to treat as the main versi…
- Canonical ErrorA canonical error happens when search engines cannot tell which URL is the preferred version of…
- Crawlability IssuesCrawlability issues are technical problems that stop search engine bots from finding and readin…
Sources
- Google Search Central Blog: To slash or not to slash developers.google.com
- Ahrefs: What Is A Trailing Slash & When Does It Matter ahrefs.com
- Seobility Wiki: Trailing Slash seobility.net
Outbound links are unpaid and nofollow. If one has gone stale, tell me.