Nightcrop
LoginGet started

Trailing Slash SEO: Does It Matter and Which to Pick

Nightcrop · December 1, 2026

For SEO, a trailing slash does not matter much. What matters is picking one form and using it everywhere. Google treats /page and /page/ as separate URLs, so serving both with the same content creates duplicates. Choose one, 301 redirect the other to it, and keep links, canonicals and sitemaps consistent.

Is a trailing slash good or bad for SEO?

Neither. Google's own guidance on this, an old but still referenced post on the Search Central blog titled "To slash or not to slash", says it "treats each URL above separately (and equally)." Neither form gets a ranking bonus. The only cost comes from having both versions live.

That post is from 2010, so treat it as background rather than a current rule. The current documentation on consolidating duplicate URLs does not mention slashes at all, but it does explain how to deal with duplicates once you have them, and that is the part that applies here.

What is the difference between /page and /page/?

Historically, a slash at the end meant a directory and no slash meant a file. Modern sites rarely map URLs to folders on disk, so the convention is just a style choice made by the framework or the CMS. WordPress adds a slash by default. Many JavaScript frameworks do not, and some let you set it with a configuration flag.

To a crawler, though, the strings are different, and a server can return different content for each. That is why you cannot treat them as the same by assumption.

What is the exception for the homepage?

The root is a special case. Google's post says that https://example.com is equivalent to https://example.com/, so you cannot meaningfully redirect one to the other, and you do not need to try. A redirect rule that loops on the root is a common bug, covered in how to fix redirect chains.

How do you pick one form?

Use whatever your platform does by default, unless you have a reason to change. Switching an established site means redirecting every URL, and that is risk with no ranking upside. A few practical guidelines:

How do you enforce it?

Google's guidance on the slash question gives the same fix as for other duplicates: use your preferred version in internal links and sitemaps, and 301 redirect the other version to it. If you cannot redirect, a canonical tag is the fallback. Work through them in this order:

  1. Redirect. Send the non-preferred form to the preferred one with a 301. See how to do a 301 redirect for the server rules.
  2. Canonical tag. Add a canonical URL pointing to the preferred form on every page, written in the same form.
  3. Internal links. Update navigation, body links and breadcrumbs so they use the preferred form. Links that hit the redirect waste a request each time.
  4. Sitemap. List only the preferred form. Google describes a sitemap as a weak signal, so it should agree with the stronger ones.

Google also advises against giving different canonical URLs for the same page through different methods, so make sure the redirect, tag and sitemap all agree.

How do you check your site?

  1. Open a page on your site and add or remove the slash by hand. You should land on the preferred form, with a single 301 and no chain.
  2. Run the same test on three more page types, such as a post, a category and a file.
  3. Look in Search Console's page indexing report for "Duplicate, Google chose different canonical than user" on slash variants.
  4. Crawl your own site and filter for internal links that point to the non-preferred form.

What about query strings and case?

The same principle applies. Google's URL structure guidance says its handling "is case sensitive" and that /APPLE and /apple are distinct URLs, and it recommends converting to one case if your server treats them the same. Slashes, case, tracking parameters and www versus non-www are all the same class of problem: several addresses for one page. Our URL structure guide and the post on duplicate content cover the rest.

Frequently Asked Questions

Should I add or remove trailing slashes on my existing site?

Usually not. If your URLs are consistent and indexed, changing them adds redirect work with no known ranking benefit. Fix inconsistencies, but do not switch styles for its own sake.

Does Google penalize a missing trailing slash?

No. Google's guidance says it treats the two forms separately and equally. The problem is only when both are live with the same content and you have not chosen a preferred one.

Do I need to redirect the homepage with and without a slash?

No. For the root, https://example.com and https://example.com/ are equivalent, so there is nothing to redirect.

Is a canonical tag enough, or do I need a redirect?

A redirect is the stronger fix and also helps visitors, so use it where you can. A canonical tag is the fallback when you cannot redirect.

Should file URLs like PDFs end with a slash?

No. A slash implies a folder, and adding one to a file URL can break the link. Leave extensions as they are.