Trailing Slashes

A trailing slash is the forward slash at the end of a URL, as in /services/ compared with /services. Search engines can treat the two versions as separate URLs, so a site should pick one style, use it consistently and redirect the other.

When the slash makes a difference

Technically, a URL with a trailing slash and one without are different addresses. Whether that matters depends on where the slash sits:

  • Root domain: https://example.com and https://example.com/ are treated as the same. Browsers add the slash automatically, so there is nothing to fix.
  • Paths: https://example.com/services and https://example.com/services/ are different URLs. If both load the same page, search engines see two copies.
  • Files: URLs ending in a file extension, such as /guide.pdf, normally do not use a trailing slash.

Historically, a trailing slash suggested a folder and no slash suggested a file. Today it is mostly a matter of convention set by your CMS. WordPress, for example, uses trailing slashes by default, while many other platforms and frameworks do not.

Why it matters for SEO

Google has said it does not prefer one style over the other. The problem is inconsistency. If both versions return a 200 status, you risk duplicate content, links split across two URLs, and analytics data divided between them. Google will usually pick one version as canonical, but it may not be the one you want.

How to choose and enforce one style

  1. Check your CMS default and keep it. Switching an established site’s style means redirecting every URL, which adds risk without benefit.
  2. Make sure the other version returns a single 301 redirect to the preferred one.
  3. Use a self-referencing canonical that matches the preferred style exactly.
  4. Use the same style in internal linking and navigation menus.
  5. List only the preferred version in your XML sitemap.
  6. Test by visiting both versions of a few URLs and checking the status codes with a header checker or crawler.

An example

A WordPress site serves /contact-us/. A visitor types /contact-us without the slash. The server should respond with one 301 redirect to /contact-us/, and the page itself should carry a canonical tag pointing to the slashed version. If instead both addresses load the page with a 200 status, the site has two copies of the same page.

Common mistakes

  • Both versions live: the most common issue, often after a platform change.
  • Redirect chains: combining slash, HTTPS and www redirects into separate hops instead of one. See redirect chains.
  • Conflicting rules: a server adding the slash while the CMS removes it can cause a redirect loop.
  • Mismatched canonicals: a canonical without the slash on pages served with it sends mixed signals.
  • Migrations: moving to a new platform with a different default can quietly change every URL. Plan redirects as part of any website migration.

Key Takeaways

  • A trailing slash is the slash at the end of a URL path.
  • With and without a slash are different URLs, except on the root domain.
  • Google has no preference, but consistency matters.
  • Redirect the non-preferred version with a single 301.
  • Match canonicals, internal links and sitemaps to your chosen style.

Related Terms

Not sure how your own site measures up? Request a free SEO review, or keep learning in the SEO Encyclopedia.