End URLs with a "/" Character  

URLs that point to directories need to have a trailing slash after them. They still work if you don't put the "/" but there is a performance penalty. The following URLs are correct and will result in quick links:

  • <A HREF="http://www.Yahoo.com/">To Yahoo</A>
  • <A HREF="http://www.LABridge.com/">Up to L A Bridge </A>
  • <A HREF="http://www.LABridge.com/tips/">To L A Bridge Tips </A>
  • <A HREF="http://www.LABridge.com/community.html">Community</A>

The following is wrong:

  • <A HREF="http://www.Yahoo.com">To Yahoo</A>
  • <A HREF="http://www.LABridge.com">Up to L A Bridge </A>
  • <A HREF="http://www.LABridge.com/tips">To L A Bridge Tips </A>

Reason: The web server thinks that you are trying to access a CGI. Most web servers are smart enough to realize that there is no CGI by that name. They must do a "reverse DNS lookup" to find out the servers real name, add the slash, and then send you the page. This reverse lookup means that the web server must ask the name server what the domain name for 206.117.169.69 is. Essentially, this is incurring two hits on the web server instead of one. Follow the link below and watch the Location bar as it adds the slash at the end of the URL:

Mal-formed link to Yahoo

Not using trailing slashes can sometimes result in exposing the virtual hosting. Watch the location bar and you will see an example when you click the link below.

Mal-formed link to L.A. Culture Net


A quick digression: When advertising a URL in print, you should use this format. If you watch television or read URLs out of the paper you may notice that most are incorrectly presented. Car adds usually report their URL in the form:

http://www.Car.com

If you read computer trade magazines like the Linux Journal you will notice that all of their URLs are properly formatted:

<http://www.MyWebSite.com/>

An aside to this digression: Domain names are never case-sensitive. L A Bridge uses mixed case alphanumerics in it's URL and e-mail address to clarify the pronunciation: <http://www.LABridge.com/>. This will work the same as <http://www.labridge.com/>. If your domain name has several words in it you might want to capitalize the first letter of each word to increase readability like this: <http://www.MyHomePage.org/>.

Summary: The trailing slash allows links to resolve faster.