25th Sep, 2007

The Closing Slash on URLs

http://dailydomainblog.com vs. http://dailydomainblog.com/ - as any fule kno, the closing slash is part of the complete URL and should always be included in links. Why?

No closing slash means that the browser makes a request, the server says “That’s not here, but here“, the browser makes another request for the URL with the slash appended, and you get to the right spot. That means:

  • An additional strain on your server from all those extra requests.
  • Slower server response, meaning more frustration for users.
  • Everyone knowing you’re not clever enough to include the final slash.

Include them! They are there for a reason. (Don’t go mad and over-correct, though; you only need them after directories, not after files.)

Resources:

A more articulate and comprehensive explanation of why you need the closing slashes on URLs from Matt Kruse.

More reasons to include the closing slash from Natalie Catchpole.

Leave a response

You must be logged in to post a comment.

Categories