Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I use URLs all the time typing them in with and without "//" after the "http:" but what does the "//" really stand for?

share|improve this question

7 Answers 7

up vote 8 down vote accepted

Slashdot had an article about this a couple of days ago. Tim Berners-Lee indicates that there was no particular reason why the two slashes are there (see also http://bits.blogs.nytimes.com/2009/10/12/the-webs-inventor-regrets-one-small-thing/).

Personally, I like the idea of this style of URL:

http:/com/example/www/blah1/blah.html

There's no explicit "hostname" in such an URL. If your "www.example.com" server farm becomes overburdened with requests to the "/blah1" resource, you just create a "blah1.www.example.com" DNS record and point it to another web server farm that hosts the "/com/example/blah1" resource hierarchy.

No doubt there are DNS implications with such an idea, and it surely won't happen now (any more than suddenly having clocks that run counterclockwise coming into style), but I think it would've worked rather well.

Edit: SRV RR's for web sites would've been really nice, too. Hell-- SRV RR's for anything would be nice.

share|improve this answer
7  
Can you really have a clock running counterclockwise, as clockwise is by definition the direction a clock runs? –  CesarB Oct 16 '09 at 20:48
    
What's a SRV RR? –  non sequitor Oct 17 '09 at 5:27
    
SRV is a resource record type in the domain name system. Read en.wikipedia.org/wiki/SRV_record for details. –  joschi Oct 17 '09 at 9:37

There is an answer for that in Tim Berners-Lee's FAQ (link found in the slashdot discussion mentioned at @Evan Anderson's answer). Basically, he copied the filename syntax from Apollo Domain, where starting a path with a double slash followed by the name of a computer was used to transparently access files in other computers (a single slash is still the root directory). He simply prepended it with the protocol, in this case http.

That special case still exists in the Unix standards, where two slashes at the beginning of a file name may be interpreted in an implementation-defined manner (three or more slashes are equivalent to just one). And the same convention is widely used in Windows, only with backslashes instead of forward slashes (it is called a UNC path there).

share|improve this answer
    
Another relevant slashdot comment: tech.slashdot.org/comments.pl?sid=1404183&cid=29744723 –  CesarB Oct 16 '09 at 20:02
    
"two slashes at the beginning of a file name may be interpreted in an implementation-defined manner" I had never heard that before. +1 –  wfaulk Oct 16 '09 at 21:44

xx:// is used to specify the protocol used, it's a double / so it can't be confused with just being a subfolder.

share|improve this answer
    
Yeah, but "//" is perfectly legal in an URL. Lots of web servers just treat it as "/" and move on. –  Evan Anderson Oct 16 '09 at 18:43
1  
Webservers (or any software using URIs) have to treat "//" as "/" in the path segment of URIs. You might want to read section 6 ("Normalization and Comparison") of RFC 3986 (ietf.org/rfc/rfc3986.txt). –  joschi Oct 17 '09 at 9:40

Tim Berners-Lee admits that this was intended to separate the protocol for the address, but turned out to be unnecessary.

http://www.theinquirer.net/inquirer/news/1558680/berners-lee-regrets-double-slash

share|improve this answer
    
This useful when you want to chain two or more protocols or pseudo-protocols, even if, I believe, it's not standard. Firefox and Chrome IIRC use it for displaying the source, something along the lines of: source:blah.com –  niXar Oct 17 '09 at 13:34

See RFC 1738, section 3.1:

While the syntax for the rest of the URL may vary depending on the particular scheme selected, URL schemes that involve the direct use of an IP-based protocol to a specified host on the Internet use a common syntax for the scheme-specific data:

//<user>:<password>@<host>:<port>/<url-path>

Some or all of the parts "<user>:<password>@", ":<password>", ":<port>", and "/<url-path>" may be excluded. The scheme specific data start with a double slash "//" to indicate that it complies with the common Internet scheme syntax.

share|improve this answer

It think it literally means "Whack! Whack!", from the really early times where actually getting a connection to a site demanded some voodoo and you had to sacrifice (whack) not one, but TWO chickens to please the WorldWideWeamons.. :)

share|improve this answer

It signifies the root of the address.

share|improve this answer
    
I saw Tim Berners-Lee state this in an interview, I can't recall where though. –  notandy Oct 16 '09 at 20:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.