0

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.

4
  • This is an implementation detail; any browser is free to implement it differently, or not to implement this feature at all. Apr 19, 2010 at 10:50
  • Have you ever tried typing 'google.com' only? Or even 'gogle.com'? Yes the misspelling is intentional.
    – Rosdi
    Apr 19, 2010 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, 2010 at 11:15
  • also you can try to only type 'google' and nothing else. In Firefox this will work. :-)
    – Diskilla
    Apr 19, 2010 at 11:37

6 Answers 6

10

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.

6

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.

5

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

3

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

3

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"

3

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

You must log in to answer this question.