Trailing Slash SEO
A trailing slash is the forward slash at the end of a URL path. For SEO, consistency in using either slash or no-slash matters to avoid duplicate content and split ranking signals.
- Also called
- URL trailing slash
- Applies to
- URL structure, internal linking, redirects
- Commonly confused with
- directory vs file convention
Key points
- Using both slash and no-slash versions of the same URL can create duplicate content.
- Google recommends choosing one preferred format and sticking to it across internal links, sitemaps, and redirects.
- A 301 redirect from the non-preferred version to the preferred version is the standard fix.
- There is no ranking advantage to using trailing slashes over not using them.
- For the root domain, the trailing slash after the hostname is irrelevant in practice.
Where it changes your decision
The trailing slash decision affects several technical SEO tasks. Consistency is key, and the following situations require attention.
- When building internal links: using inconsistent slash versions can split link equity and confuse search engines.
- When submitting an XML sitemap: listing both URL variants may cause duplicate content signals. Use only the preferred version.
- When setting up redirects: a 301 redirect from the non-preferred version to the preferred version is the standard fix. If redirects are not possible, a canonical tag is a fallback option, though Google still recommends redirects first.
What it is not
- Belief: Using a trailing slash gives a ranking advantage. Correction: There is no inherent SEO benefit to using or omitting the slash; consistency matters most.
- Belief: The trailing slash reliably indicates a directory versus a file. Correction: This is a legacy convention and should not be treated as a reliable SEO rule today.
- Belief: Inconsistent URLs are harmless if you use a canonical tag. Correction: Google recommends redirects first; relying solely on canonicals is a weaker solution.
- Belief: The root domain trailing slash is treated differently. Correction: Google has said the slash after the hostname is irrelevant; domain.com and domain.com/ are treated the same in practice.
Sources
- Google Search Central Blog: To slash or not to slash Google’s direct guidance on choosing one preferred URL version, using redirects, and keeping internal links and sitemaps consistent.
- Google Search Central documentation/blog guidance Primary Google source for URL canonicalization and duplicate URL handling recommendations.
- Ahrefs: What Is A Trailing Slash & When Does It Matter Clear explanation of how slash and no-slash variants behave for SEO and why consistency matters.
- Seobility Wiki: Trailing Slash Concise definition and practical SEO explanation of slash-related duplicate URL issues.