Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there really a difference between http://example.com and www.example.com?

I seem to have stuck in this weird issue. If I open my website by giving the address as http://example.com, it opens up fine. But if I enter the address as www.example.com or http://www.example.com, then the site opens as if the browser is JS disabled (and without any CSS formatting).

I tried in IE, Firefox and Chrome. The issue occurs consistently.

Is there really any difference between http://example.com and www.example.com?

If yes, then is there any way to give a consistent experience to the user irrespective of how he landed on the site? Maybe, by redirecting him to the http site even if he used just www.

like image 377
Janaaaa Avatar asked Dec 20 '12 02:12

Janaaaa


People also ask

Is example com and www example com different?

With this, you won't need any redirection, and both will be the exact same. The www is the hostname, example.com is the domain name, and www.example.com is the FQDN.

What is http example com?

www.example.com is the hostname. The intent of the Host header mechanism, and in particular the requirement that enforces its presence in HTTP/1.1 requests, is to speed the transition away from assigning a new IP address for every vanity URL.

Is www example com a domain name?

The domain names example.com, example.net, example.org, and example.edu are second-level domain names in the Domain Name System of the Internet.

Is there any reason to use www?

This isn't strictly necessary, but it is traditional to include an indication of the services offered by a server in the domain, and Tim Berners-Lee used “www” for the first web pages at CERN. There is nothing special about the “www” subdomain other than tradition.


1 Answers

Yes. www.example.com is a subdomain of example.com. Typically they are the same site, but not necessarily. Some servers will only accept one or the other. Others (like mine) will redirect www.domain.tld to domain.tld for easier cookie handling. Others still (very few) host completely different websites.

like image 193
Niet the Dark Absol Avatar answered Sep 19 '22 21:09

Niet the Dark Absol