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
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.
Sources
- To slash or not to slash – Google Search Central Blog (April 21, 2010)developers.google.com
- Trailing slash – Ahrefs (secondary)ahrefs.com
- Consolidate duplicate URLs – Google Search Central (as of October 2026)developers.google.com
Last updated: