Free auditStart free
GlossaryGlossary · Crawling and indexing

Trailing slash in URLs

Decide whether paths end in a slash, then align redirects, canonicals, internal links, and sitemaps to one URL per page.

3 min
read
4
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
In one line

A trailing slash is the final / in a URL path, as in /guides/. The slash and no-slash versions can be separate URLs, even when they show the same page. Choose one convention and make the other version redirect to it; keep canonicals, internal links, and sitemaps consistent with the chosen URL.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01Good to know

A slash creates a different URL

These are distinct addresses: https://example.com/guides and https://example.com/guides/. A server may return the same page for both, redirect one, or serve different content. Google says it treats slash and no-slash URLs separately (and equally), so two URLs that both return 200 with the same content are duplicates. Different content on the two is permissible to Google but often confusing for users. The one exception is your root URL: Google says https://example.com is equivalent to https://example.com/ and cannot be redirected. The most direct Google statement on this is a 2010 blog post; the current URL structure and canonicalization docs cited here do not mention trailing slashes.
02How it works

Make every signal agree

Google treats redirects and canonical annotations as strong canonicalization signals, while sitemap inclusion is weaker. Use the canonical URL guide and redirect guide when consolidating existing variants.

  1. 01

    Choose the canonical format

    Decide whether page paths use a final slash. Check the framework, CMS, server, and existing URL patterns before changing a live site.

  2. 02

    Redirect the alternate URL directly

    When both versions currently return the same page, permanently redirect the non-preferred version to the preferred one. Test both paths and confirm the destination returns 200. Avoid a chain such as /guide → /guide/ → /guide.

  3. 03

    Update page signals

    Per Google's post, use the preferred URL in internal links and include only the preferred version in the sitemap. Add a self-referencing canonical on the preferred page.

  4. 04

    Check generated paths and exceptions

    Test the homepage, files, nested routes, query parameters, and routes already covered by redirects. Some systems treat file paths differently from page routes; preserve intentional exceptions and prevent redirect loops.

03Checklist

Changing the convention on an established site

  1. 01Do not change slashes for cosmetic consistency alone. If a migration is justified, map each old URL to its matching new URL and deploy direct server-side redirects.
  2. 02Update internal links and canonical tags in the same release; otherwise crawlers and visitors may keep hitting the old form.
  3. 03Regenerate the sitemap with only preferred URLs, then crawl both slash variants to find 404s, redirect chains, and loops.
  4. 04Check Search Console after launch. Google may need time to recrawl and consolidate the changed URLs.

For a broader checklist, see URL structure. Google's URL structure guidance covers crawlable, consistent paths; its canonicalization documentation explains how redirects, canonicals, and sitemap URLs work together.

Questions

Asked a lot.

3 questions people ask next, answered from the sources on this page.

01Does Google prefer URLs with a trailing slash?

No. Google treats the slash and no-slash forms as separate URLs. Choose one site-wide convention and consistently redirect and link to it.

02Should I use a canonical tag or a redirect for slash variants?

If one duplicate URL should no longer be used, Google's 2010 post recommends a 301 redirect from the duplicate to the preferred version, and calls rel=\"canonical\" a strong option if a redirect is not possible. Either way, link internally to the preferred URL and list only that version in the sitemap.

03Can changing trailing slashes hurt a site migration?

It can create broken paths, chains, or loops if redirects and generated links disagree. Map old paths to their final destinations, update canonicals and sitemaps, and test both variants before release.

Sources · 4

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • google.com
  1. 01To slash or not to slashdevelopers.google.com · checked 2026-10-24
  2. 02URL structure best practices for Google Searchdevelopers.google.com · checked 2026-10-24
  3. 03How to specify a canonical URL with rel=canonical and other methodsdevelopers.google.com · checked 2026-10-24
  4. 04Redirects and Google Searchdevelopers.google.com · checked 2026-10-24
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly