SEO

Trailing Slash

Also called trailing slash URL

The forward slash at the end of a URL, which can make two otherwise identical addresses count as separate pages.

Quick facts: Trailing Slash

Category
SEO
Also called
trailing slash URL
Level
Beginner
Affects
Duplicate URLs, redirect chains, analytics accuracy, crawl efficiency
Where to see it
A browser address bar, Screaming Frog, Search Console URL Inspection, server or CMS redirect settings
In this article4
  1. How trailing slashes work
  2. Why it matters
  3. Common mistakes
  4. How to act on it

A trailing slash is the forward slash at the very end of a URL, as in example.co.uk/services/ compared with example.co.uk/services. To a web server and to Google, those can be two different addresses, so a site needs to choose one form and use it consistently.

How trailing slashes work

Historically a trailing slash signalled a folder and no slash signalled a file. Modern sites rarely map URLs to real folders, but the distinction survives. Google treats the two versions as separate URLs, with one exception: on the bare domain, example.co.uk and example.co.uk/ are the same, because a browser always requests the root with a slash.

Platforms set their own convention. WordPress uses trailing slashes by default in its permalinks. Shopify and many JavaScript frameworks do not. Neither choice is better for rankings. The problem only arises when both versions load the same content with a 200 status, which creates duplicate content and splits signals between two addresses.

A well-configured site answers the non-preferred form with a 301 redirect to the preferred one, and each page carries a canonical tag pointing at the preferred version.

Why it matters

On its own, a mix of slashed and unslashed URLs rarely causes a disaster; Google is good at picking one version. But it adds avoidable noise. Links from other sites may point at both forms, internal links may be inconsistent, analytics reports split one page into two rows, and crawlers waste time fetching duplicates. On a large ecommerce site, combined with tracking parameters and filters, this multiplies quickly.

It matters most during migrations. Moving from WordPress to Shopify, for instance, often changes the slash convention on every URL. If redirects map old slashed addresses to unslashed ones that themselves redirect, you get chains across the whole site. The same happens when a developer changes server rules during a hosting move and nobody checks the redirect behaviour afterwards.

A quick illustration: a Kent estate agent’s site loads both /properties-for-sale and /properties-for-sale/. Some property portals link to one, the site’s own menu to the other, and the agent’s newsletter to a third variant with a tracking parameter. Google eventually picks a version, but until it does, links and reporting are split three ways for no benefit.

Common mistakes

  • Both versions returning 200. The most common fault; check by loading a page with and without the slash.
  • Inconsistent internal links. Menus using one form and body links using the other, so every click passes through a redirect.
  • Canonicals that disagree with redirects. A page that redirects to the slashed version but canonicalises to the unslashed one sends mixed signals.
  • Redirecting files. Adding a slash to URLs ending in .pdf or .xml breaks them.

How to act on it

Pick the form your platform already uses; switching convention on an established site creates redirects for no gain. Test a few pages by typing each version into the browser: the wrong one should 301 to the right one in a single hop. On Apache servers this is often a rule in the .htaccess file; on WordPress the permalink settings handle it.

Then crawl the site and look for internal links to the non-preferred form, canonicals that do not match the final URL, and any redirect chains. Keep the convention in mind when planning a new URL structure. Fixing these alongside other duplication problems is part of a technical SEO audit and fix.

Do and do not

Do

  • Choose one form and 301 the other to it
  • Use the chosen form in links, canonicals and sitemaps
  • Check the convention before a migration

Do not

  • Let both versions return a 200 status
  • Switch convention on a live site without reason
  • Add slashes to file URLs such as PDFs

Questions people ask about this

Is it better to have a trailing slash or not?

Neither is better for SEO. What matters is consistency: one version loads, the other redirects to it, and internal links, canonicals and sitemaps all use the same form. Stick with whatever your platform uses by default.

Does Google penalise sites for trailing slash duplicates?

No. It is a duplication issue, not a penalty. Google usually picks one version to index, but it may not pick the one you want, and signals can be split between the two until it settles.

Should I change my URLs to add or remove trailing slashes?

Only if you have a strong reason, such as a migration that is already changing URLs. Changing convention across a live site means redirecting every page, which carries risk and brings no ranking benefit on its own.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.