Skip to Content

Difference between URL path ends with trailing slash or not

Posted on

If I have 2 urls:

http://www.example.com/some/slug/paths/
http://www.example.com/some/slug/paths

Is it different? The answer is Yes!

Long story short Google does not care if you have a trailing slash. However, it will treat the above 2 paths as separate pages.

Why? URLs with a trailing slash to indicate a directory, and those without a trailing slash to denote a file.

http://example.com/foo/ (with trailing slash, conventionally a directory)
http://example.com/foo (without trailing slash, conventionally a file)

If you need to have both of the above and they are the same content your best option is to do a 301 Redirect to one of them from the other.

References:

comments powered by Disqus