# Trailing slash

Category: [Technical SEO](https://seo-geo-glossary.com/en/glossary/category/technical-seo/) › [URLs & domains](https://seo-geo-glossary.com/en/glossary/category/technical-seo/urls-domains/) · Also known as: final slash

A **trailing slash** is the forward slash at the end of a URL, as in `https://example.com/foo/`. Historically, a trailing slash marked a directory and a URL without it marked a file.

## How does Google treat a trailing slash?

According to Google, the convention does not have to hold. Google treats `https://example.com/foo/` and `https://example.com/foo` as separate URLs, whether they are files or directories. It accepts different content on both, though users may find that confusing. In practice, both versions usually serve the same content.

The root URL is an exception. `https://example.com` and `https://example.com/` are equivalent.

## What if both versions return 200?

If both versions return the same content with a 200 status, Google calls this legitimate, because its indexing often handles the situation. It still lists two options, which are leaving it as is or serving only one version. A redirect from one version to the other reduces duplicate content and improves crawl efficiency. Google's current documentation on canonicalization still lists redirects and `rel="canonical"` as strong signals and sitemap inclusion as a weak one. Google's blog notes that when a page redirects to a trailing slash URL, search results will likely show the version that returns 200, regardless of 301 or 302.

Ahrefs adds that canonical tags, internal links and sitemaps should consistently point to the preferred version.

## Example

```txt
https://example.com/guides/   (redirects with 301 to the version below)
https://example.com/guides
```

Pick one pattern for the whole site, redirect the other to it, and use the same form in internal links and canonical tags.

*Diagram: Anatomy of a URL.* A URL broken into its parts. RFC 3986 defines scheme, host, path, query and fragment. Only the browser evaluates the fragment after #, it is not sent to the server.

## Related terms

- [URL](https://seo-geo-glossary.com/en/glossary/url/index.md)
- [URL structure](https://seo-geo-glossary.com/en/glossary/url-structure/index.md)
- [Duplicate content](https://seo-geo-glossary.com/en/glossary/duplicate-content/index.md)
- [301 redirect](https://seo-geo-glossary.com/en/glossary/301-redirect/index.md)
- [Canonical tag](https://seo-geo-glossary.com/en/glossary/canonical-tag/index.md)

## Sources

- [To slash or not to slash – Google Search Central Blog (April 21, 2010)](https://developers.google.com/search/blog/2010/04/to-slash-or-not-to-slash)
- [Trailing slash – Ahrefs (secondary)](https://ahrefs.com/blog/trailing-slash/)
- [Consolidate duplicate URLs – Google Search Central (as of October 2026)](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/trailing-slash/
