Should You Use Trailing Slashes in URLs?

Google’s John Mueller was asked on Twitter whether the best solution is for a site to use a trailing slash or no trailing slash at the end of URLs.

John confirmed that the best solution is to use either version, but to then be consistent:

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.

trailing slashes in URLs

This means that if you have URLs on your site that do not end in a trailing slash, then all internal links, redirects, canonicals, etc. should not have a trailing slash either.

Leave a Reply

Your email address will not be published. Required fields are marked *