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.

  • This is an implementation detail; any browser is free to implement it differently, or not to implement this feature at all. 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

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.


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.


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


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


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"


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy