Trailing slash or not

The “trailing-slash or not” question comes up from time to time, so I thought I’d write something short up.

tl;dr: the slash after a hostname or domain name is irrelevant, you can use it or not when referring to the URL, it ends up being the same thing. However, a slash anywhere else is a significant part of the URL and will change the URL if it’s there or not. This is not SEO-specific, but just how websites work :).

The first part comes from , where every request you make to a server must contain a URI, and if you’re asking for the homepage, that would be “/”. You can try this out with “telnet” if you want to feel like a hacker (they’re just normal requests, nothing hacker’y about them :-)):

The second part is essentially a question of asking for a subdirectory or file. Many servers automatically redirect there, which makes it look like the same thing, but you can easily see it by asking for a file with an unnecessary slash, eg. vs .

Original at

Comments / questions

There's currently no commenting functionality here. If you'd like to comment, please use Twitter and @me there. Thanks!

Tweet about this - and/or - search for latest comments / top comments

Related pages