A trailing slash is the “/” character at the very end of a web address, as in example.com/shoes/ compared with example.com/shoes. To a person the two look the same. To a search engine they are 2 separate URLs, and if both load the same page you have made a small copy of your own content.
What is a trailing slash? #
Every address has a path: the part after the hostname. In example.com/blog/post/ the path is /blog/post/. The slash at the end is the trailing slash. By old convention a path ending in a slash pointed to a folder (a directory), and a path without one pointed to a file, such as /about.html. Google’s 2010 post To slash or not to slash repeats this convention and adds that it is not a requirement. Modern sites rarely serve real folders, so the slash is now mostly a style choice made by your CMS or your server.
Is the slash after the domain name the same thing? #
No. The root of a site is a special case. The URI standard, RFC 3986, says in section 6.2.3 that the http scheme treats an empty path as equal to “/”. So https://example.com and https://example.com/ are one address. Google’s post says the same and notes that this pair cannot be redirected. You only need to think about the slash on deeper paths, such as /shop or /shop/.
Why does it matter for search? #
Google’s 2010 post says plainly that it treats each version separately and equally. If /shoes and /shoes/ both return a 200 status with the same page, that is duplicate content on a small scale. It is not a penalty. The cost is quieter:
- Google has to pick one version as the canonical, and it may not pick the one you link to.
- Links from other sites can split between the 2 versions, so link equity is spread thin.
- Your crawl budget is spent fetching the same page twice.
- Reports in Google Search Console and your analytics show 2 rows for one page, which makes trends harder to read.
Google’s page on specifying a canonical URL lists the signals it uses to choose. Redirects are the strongest. A canonical tag is a strong signal. Listing a URL in a sitemap is a weak one.
Why does it matter for AI answers? #
AI assistants that browse the web, and the crawlers that feed them, fetch addresses the same way a search crawler does. When an AI crawler meets 2 versions of one page, it can store both, quote either, or follow a redirect each time it visits. One clean address per page means one place for a citation to point to. It also keeps your server logs simpler when you count which bots read which pages.
How does it work on a server? #
Your server or CMS decides what happens when someone asks for the version you did not choose. There are 3 common outcomes:
- A redirect. The server answers with a 301 or 308 and sends the visitor to the preferred version. This is the clean result.
- The same page twice. Both versions answer 200 with the same content. This is the duplicate case above.
- An error. One version loads and the other returns a 404. This breaks any link that uses the wrong form.
The Apache web server has a setting called DirectorySlash. Its documentation says it is on by default and redirects a request for a real folder without a slash to the same address with the slash added. The same page warns that turning it off can expose a folder listing in some setups. Most CMS platforms build their addresses from a permalink pattern, so the slash style is set in one place. Test what your own site does with the other form, never assume.
Which one should I choose? #
Either works. Google’s post says a slash is more usual for directories, but the search engine does not prefer one style. What matters is that you pick one and stay with it. Changing style on an old site means redirecting every page, which carries the same risks as any site move. If your site already uses one form everywhere, keep it.
How do I fix it? #
Google’s 2010 post sets out the steps, and they still hold:
- Choose the preferred version.
- Use it in every internal link and in your XML sitemap. Google’s canonical page asks you to link to the canonical URL, not a duplicate.
- Send a permanent redirect from the other version. Google’s page on redirects and Google Search says 301 and 308 tell its indexing pipeline that the target should be canonical, while 302 and 307 do not. See 301 vs 302 redirect.
- If you cannot redirect, add a rel=”canonical” tag pointing to the preferred version.
- Check that the redirect is a single hop, not a redirect chain through http, www and slash rules one after another.
Common mistakes #
- Mixed internal links. Menus use /shop/ and blog posts use /shop. Every click then costs a redirect.
- Canonical tags that disagree with the redirect. The page at /shop/ says its canonical is /shop, which redirects back. That is a loop of signals.
- Sitemaps in the wrong style. Your sitemap checker report should list only the addresses that answer 200.
- Forgetting files. Real files such as /robots.txt or /image.webp should never get a slash added.
- Case and slash together. Google’s URL structure guide warns that URLs are case sensitive, so /Shop/ and /shop/ are also different addresses.
- Query strings. A URL parameter sits after the path, so /shop/?page=2 and /shop?page=2 are a separate pair to test.
A worked example #
A small online shop has a category page at /garden-tools/. Its menu links to /garden-tools/. A blog post links to /garden-tools without the slash. A supplier site links to the same short form. The server answers 200 to both. In Search Console the shop sees 2 rows for one page, each with half the clicks. The fix takes 3 steps. The owner adds a 301 from /garden-tools to /garden-tools/, edits the blog post link, and checks that the canonical tag on the page names /garden-tools/. Within a few crawls the 2 rows start to merge into one.
How do I check it? #
- Paste both forms of a deep page into our free redirect checker. One should answer 200, the other one hop of 301 or 308 to it.
- Run the preferred page through our canonical checker to confirm the tag names that same address.
- Use our HTTP header checker to see the exact status code and Location header.
- Crawl your own pages with our broken link checker to find internal links in the wrong form.
- In Search Console, use URL Inspection on both forms to see which one Google picked as canonical.
These are part of our 56 free tools. Our guide on how to use the redirect checker walks through a real test.
Questions #
Will a trailing slash hurt my rankings? #
No. Neither style ranks better. Only inconsistency causes trouble.
Do I need to change my whole site? #
No. Keep the style you have and redirect the other one.
Does it matter for the home page? #
No. The address with and without the final slash after the domain is one and the same.
Related words #
Sources #
- Google Search Central Blog: To slash or not to slash (21 April 2010), checked 24 November 2026
- Google Search Central: How to specify a canonical URL with rel=”canonical” and other methods, checked 24 November 2026
- Google Search Central: Redirects and Google Search, checked 24 November 2026
- Google Search Central: URL structure best practices for Google Search, checked 24 November 2026
- RFC 3986: Uniform Resource Identifier (URI): Generic Syntax (January 2005), checked 24 November 2026
- Apache HTTP Server: mod_dir and DirectorySlash, checked 24 November 2026
Updated 24 November 2026 by URSY.
Cite this page: Trailing slash. URSY. Updated 24 November 2026. https://ursy.com/wiki/trailing-slash/ · Section links
Tools for this
- LiveAI Readiness Checkeris your site ready for ChatGPT, Gemini, Claude? Score + fixesRun the check →
- LiveAI Bot Checkerwhich AI bots your robots.txt lets inRun the check →
- LiveRobots.txt Checker + Generatortest any address against your rules, or write new onesRun the check →
- LiveSchema Markup CheckerRun the check →