Either works for search, as long as you pick one and use it everywhere. A trailing slash is the "/" at the end of a URL, as in /about/ versus /about. Google can treat the two forms as different URLs, so choose one, redirect the other to it with a 301 and keep internal links, canonical tags and the sitemap consistent.
Why it matters
On most servers /about and /about/ are technically different addresses, and a site that answers on both has created duplicate pages. Google's documentation notes that a slash after the host name alone (example.com versus example.com/) makes no difference, but a slash at the end of a path can. Duplicates split links and make reports noisy.
How to choose and apply
- Look at how your site works now. Folders such as /blog/ often end with a slash, and files such as /logo.png never do. Many frameworks and CMS tools default to one style, so following the default avoids fighting the software.
- Choose one style for pages. A common convention is a slash for sections and index pages and none for files with extensions, but consistency matters more than the style.
- Test the other form:
curl -sI https://example.com/about
curl -sI https://example.com/about/
One should answer 200 and the other should answer 301 pointing at it. 4. Add a rule if both return 200. In nginx, for example, a rewrite can add or strip the slash; in Apache, use RewriteRule conditions that check the request is not a file or directory; in a CMS, look for a permalink setting. 5. Set a self-referencing canonical tag on each page, using exactly the chosen form. 6. Update the sitemap and internal links to the chosen form so that no one has to follow the redirect. 7. Check Search Console later for "Duplicate" or "Page with redirect" entries that mention the other form.
Common mistakes
- Serving both forms with a 200 status and no canonical tag.
- Redirecting in one direction in the CMS and the opposite direction in the server.
- Applying the rule to file URLs such as images, scripts or downloads.
- Mixing styles in internal links, which sends crawlers through redirects.
- Changing the style on a live site without redirects for every old URL.
Frequently asked questions
Does a trailing slash affect rankings?
Google has not said that either style ranks better. The risk is duplicate URLs, not the slash itself.
Should the home page have a slash?
It does not matter. The addresses example.com and example.com/ are treated as the same, so no redirect is needed.
Which style should a new site use?
Use what your framework or CMS produces by default, because fighting it creates extra redirect rules to maintain.
Related guides
- SEO-friendly URLs
- Canonical URLs and duplicate pages
- Site architecture and URL structure
- Nginx and Apache redirects for SEO
Want to see how your own URLs behave? Try the free website sample.