Technical SEO
Trailing Slashes: When /page and /page/ Actually Matter
/recipes and /recipes/ are two different URLs. The four things a server can do with a trailing slash, which one needs a fix, how to fix it in six steps, and what we found on our own site.
On this page
A trailing slash is the most boring character in a URL. It sits at the end, does nothing you can see, and nobody has ever visited a website because of one. And yet /recipes and /recipes/ are two different addresses. Your server decides what happens at each of them, and it doesn't ask you first.
Most of the time this is fine. One address redirects to the other, everyone lands on the same page, done. The trouble starts when both addresses work at the same time, or when your own menu, sitemap and canonical tags can't agree which one is the real one. Then one page has two front doors, and nobody remembers building the second.
This post covers what the slash really changes, the four things a server can do with it, and the small fix for each. We also checked our own site while writing it. More on that at the end, and yes, it's a little embarrassing.
In short
Pick one form for each page. Send the other form to it with a permanent redirect. Then make your own links, XML sitemap and canonical tags use the form you picked. A working one-way redirect is healthy, so leave it alone. Two addresses that both serve the same page, or a sitemap that lists the address that redirects, are worth a look.
Is /page the same as /page/?
No. They look the same to people, but they are two URLs. The server can show the same page at both, redirect one to the other, show two different pages, or return an error for one of them. The address alone doesn't tell you which. You have to open it.
Google's John Mueller put it plainly in 2017: a slash anywhere after the domain “is a significant part of the URL and will change the URL if it's there or not”. He added that “this is not SEO-specific, but just how websites work.” His demo was Google's own site: google.com/humans.txt opens a file, google.com/humans.txt/ is a 404.
There's one exception, and it's the one people always ask about: the home page. https://example.com and https://example.com/ are the same request, because the browser asks for / either way. Google's 2010 post on slashes says the root URL “can't be redirected even if you're Chuck Norris.” Mueller later said the same with less Chuck Norris: the slash after a domain name is “always implied for canonicalization.” So don't try.
Neither form is better for SEO. Patrick Stox at Ahrefs calls it “more of a personal preference than anything” and adds: “unless your setup is causing issues I wouldn’t try to force a change to your URLs.” So if your site uses slashes everywhere, keep the slashes. If it uses none, keep none. Switching a healthy site from one style to the other is a lot of redirects for no prize.
The four things a server can do
Open both versions of a page and look at the status code. You'll get one of these four.
In the healthy case, /recipes answers with a 301 and sends you to /recipes/, which returns 200. Keep the redirect. It catches old bookmarks, links from other sites and anyone who types the address by hand.
In the second case, /recipes and /recipes/ both answer 200 with the same content. Now one page has two live copies. Google will pick one of them as the main version. Maybe the one you'd pick, maybe not. This is the case to fix.
Sometimes both answer 200 with different content. That's rare on normal content pages, but it happens with apps and APIs, where /api/menu and /api/menu/ can be two different things on purpose. Don't merge them just to make the URLs look tidy. Ask whoever built it first.
And sometimes one form is simply broken: /recipes gives a 404 while /recipes/ works. That's only a problem if someone actually uses the broken form. Check your own links and any links from other sites before you touch the routing.
Why bother if everyone lands on the right page?
Because the page isn't the only thing that needs to agree. When Google finds the same content at more than one URL, it picks one as the canonical, the version it shows in search. It decides from several signals: redirects, canonical tags, which URL your sitemap lists, which one your own links point to. Google's documentation calls a redirect “A strong signal that the target of the redirect should become canonical” and a sitemap entry only “A weak signal”. Signals that agree make the choice easy. When your redirect says one thing and your sitemap says another, you're asking Google to break the tie.
Mueller's advice from 2019 fits in two sentences: “The best solution is to be consistent and only use one version of a URL. Link to that version, redirect to it, use it in sitemaps, use it for rel-canonical, etc.” That's the whole job, really. The rest of this post is detail.
Then there's the small stuff that adds up. A menu link that points at the redirecting address makes every visitor and every crawler take one extra hop. One hop is cheap. One hop on every page load, forever, because a template has the wrong URL in it, is just silly. And templates are where these things live. One wrong setting in a theme or a sitemap plugin repeats itself on every page you'll ever publish.
What it won't do is get you penalised. Two copies of a page is not a crime. Google's 2010 post even called leaving both versions live “perfectly legitimate and a-okay. :)”, smiley theirs. The goal isn't to dodge a punishment. It's to stop making Google guess, and to send people straight to the page instead of via a detour.
Where this usually goes wrong
The menu link that redirects on every visit
Your main menu links to /pricing, the server redirects to /pricing/, everyone gets there, nobody complains. It can stay like that for years. Sitebulb's crawler docs sum it up: with these redirects, “the issue is not that they exist in the first place, it is that you have internal links pointing to them”. Fix the link, keep the redirect. And if the link sits in the header or footer, that's good news: one template change fixes it on every page at once.
The sitemap that lists the other form
The sitemap says /locations/berlin, the live page is /locations/berlin/. Google's sitemap guide is clear about what a sitemap is for: “you're telling search engines about which URLs you prefer to show in search results. These are the canonical URLs.” Listing the one that redirects tells them the wrong thing. Ahrefs' Site Audit even reports it as an error, because “Redirecting URLs in sitemaps send a misleading signal to search engines”. Don't edit the XML by hand. Find what generates it (the CMS permalink setting, a plugin, a custom script) and fix it there, or the next rebuild undoes your work.
The upgrade that quietly turned on both
A framework or hosting change makes /about and /about/ both return 200. The page looks fine in a browser, so nobody notices. Platforms really do differ here. Next.js removes the slash by default. Vercel, unless you configure it, answers both forms without redirecting, and its own documentation says “This is not recommended because it could lead to search engines indexing two different pages with duplicate content.” Nice of them to warn you, in a config reference nobody reads. You only spot it if you open both addresses or run a crawler that finds both.
The “add a slash to everything” rule
Someone adds a site-wide rule at the CDN. Now /sitemap.xml becomes /sitemap.xml/, an API endpoint stops working and the login form posts to nowhere. Scope rules to real pages, skip files and anything with a query string, and test before you celebrate.
How to fix it
- Open both addresses. Note the status code, where you end up and the canonical tag. Our free redirect chain checker shows every hop, and the canonical checker shows which URL the page says is the main one.
- Decide whether they are one page. Same article at two addresses: one page. Two different app routes: leave them alone.
- Pick the form you already use. Look at your menu, your sitemap and your canonical tags. Whatever most of them use is your answer. Don't start a migration over a slash.
- Redirect the other form. Use a permanent redirect, a 301 or 308, from the alternative to the one you picked. Not a 302 or 307: for temporary redirects, Google says its indexing pipeline “doesn't use the redirect as a signal that the redirect target should be canonical.” If a redirect really isn't possible, a canonical tag on both versions helps Google, but it doesn't move visitors anywhere.
- Fix your own links and sitemap. Menus, breadcrumbs, links in your posts, the XML sitemap. The sitemap checker shows whether your sitemap lists URLs that redirect. Keep the redirect for everyone else's links.
- Test a few page types. A normal page, a nested page, the home page, a URL with a query string and a file like
/sitemap.xml. Make sure nothing loops and nothing takes two hops.
What DeepSpider checks
DeepSpider's Trailing slash URL consistency check lives under Site architecture and is marked Needs review. It doesn't count towards the Website Health Score.
It only looks at pairs it actually saw during the audit: the same address with and without the final slash, both crawled. It skips the home page, anything with a query string and anything that looks like a file. It never invents the other form of a URL just to test it.
A pair gets flagged in three situations:
- Both forms return 200 and the main text of the two pages is the same.
- One form sends a permanent redirect (301 or 308) to the other, and your own pages link to both forms.
- One form sends a permanent redirect, and your XML sitemap lists the one that redirects.
A clean one-way redirect on its own is healthy and isn't flagged. Two forms with different content aren't flagged either. A temporary redirect (302 or 307) isn't judged at all. The check doesn't read canonical tags, so it won't claim a canonical conflict. Each finding shows both addresses with their status codes, and the Smart Fix Guidance picks the fix that matches what was found.
FAQ
Does Google prefer URLs with a trailing slash?
No. Either form works. What matters is that you pick one per page and your redirects, links, sitemap and canonical tags all point to it.
Will two 200 versions get my site penalised?
No. Google picks one version and shows that. The risk is that it picks the one you didn't want, not a penalty.
Should I redirect every no-slash URL to a slash URL?
Only real pages. Files, API endpoints and URLs with query strings usually need different handling. Test the rule on a few page types before you switch it on for the whole site.
Is a canonical tag enough?
It helps Google pick the right version, but visitors still land on whichever address they clicked. If the other form doesn't need to exist, a redirect is cleaner.
We checked our own site
While writing this, we opened deepspider.ai/pricing without the slash. It returned 200. So did deepspider.ai/pricing/. Same page, two live addresses, on the website of a company that sells SEO audits. Excellent.
Then we did what this post tells you to do and looked at the signals. The canonical tag on both versions points to /pricing/. Every link on the site uses the slash. The sitemap lists only the slash versions. Search Console's duplicate reports don't list a single no-slash URL from our site. So Google has every reason to pick the right one, and by our own advice this is a low-priority fix.
We still wanted the redirect. Then we found out what it would take. Our site is a static site that serves /pricing and /pricing/ from the same file, and our host's redirect rules can't say “add a slash, but only where it's missing” without a separate rule for every page. The other way is to send all our traffic through a CDN proxy just to add one rule, and that brings its own bot and cache settings to babysit. For one redirect that nothing links to, no thanks. So we're living by our own step 4: when a redirect isn't practical, the canonical tag does the job. It's been doing it quietly all along.
There's a lesson in it too. DeepSpider wouldn't have flagged this, because no link anywhere points to /pricing, so the crawler never saw that address. A crawler can only judge the addresses it finds. If a version of your URL exists that nothing links to, the only way to find it is to type it in and look.
Sources
- Google Search Central Blog (Maile Ohye): To slash or not to slash (21 April 2010)
- Google Search Central: How to specify a canonical URL with rel="canonical" and other methods (updated 10 July 2026)
- Google Search Central: Build and submit a sitemap (updated 8 July 2026)
- Google Search Central: Redirects and Google Search (updated 14 April 2026)
- Ahrefs (Patrick Stox): What Is a Trailing Slash & When Does It Matter (updated 26 February 2021)
- Search Engine Roundtable (Barry Schwartz): Google On Trailing Slashes & How It Impacts SEO & Search Rankings (19 December 2017)
- Search Engine Roundtable (Barry Schwartz): Google: The Trailing Slash Is Implied For Canonicalization (27 December 2018)
- Search Engine Roundtable (Barry Schwartz): Google: Be Consistent. Use Either Slash Or No Slash After URL, Not Both. (11 July 2019)
- Sitebulb: Internal redirects from trailing slash mismatch (checked 30 October 2026)
- Ahrefs Help Center: 3xx redirect in sitemap error in Site Audit (3 September 2026)
- Next.js: trailingSlash (updated 16 June 2025)
- Vercel: Static Configuration with vercel.json (updated 14 August 2026)
