Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What happens when I type www.google.com and click go in the browser. How does the URL change to http://www.google.com? Please explain this to me.

share|improve this question

migrated from stackoverflow.com Apr 19 '10 at 10:57

This question came from our site for professional and enthusiast programmers.

    
This is an implementation detail; any browser is free to implement it differently, or not to implement this feature at all. –  Charles Duffy Apr 19 '10 at 10:50
    
Have you ever tried typing 'google.com' only? Or even 'gogle.com'? Yes the misspelling is intentional. –  Rosdi Apr 19 '10 at 10:55
1  
The "automatic" conversion from google.com or even gogle.com to www.google.com is a different thing. The "http://" protocal part of the URI is added by the browser (as explained many times by other users). On the other hand, the server converts google.com or gogle.com to www.google.com to generate a consistent address. –  Martin Apr 19 '10 at 11:15
    
also you can try to only type 'google' and nothing else. In Firefox this will work. :-) –  Diskilla Apr 19 '10 at 11:37
add comment

6 Answers 6

http:// is the standard transport protocol for web sites. Your browser uses that protocol as the default, allowing "shorthand" notation of www.domain.com for convenience.

There are other protocols like ftp://, svn:// .... that you have to type in full.

share|improve this answer
add comment

That's simply a convenience feature in the browser based on the assumption that due to the overwhelming popularity of HTTP, any URL that does not have a protocol part is intended to be a HTTP URL.

share|improve this answer
add comment

The browser simply assumes the protocol you want to use is http

Browsers support more than just http .. there's https, ftp, among others.

If you do not supply a protocol manually, it just defaults to http

share|improve this answer
add comment

i think it's as simple as most browsers defaulting to HTTP when no protocol is specified.

share|improve this answer
add comment

If no protocol is defined, the browser automatically assumes the http protocol. This may not always be the right choice though.

Lets say you have a site that needs to be accessed via the rtsp protocol at rtsp://randomsite.com

If you just type "randomsite.com" into your browser, then your browser will still go to "http://randomsite.com"

share|improve this answer
add comment

The browser automatically adds http:// if no protocol specified by user

share|improve this answer
add comment

Your Answer

 
discard

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