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

I seem to be stuck in this strange problem. If I open my site with the address as http://example.com , it will open perfectly. But if I enter the address as www.example.com or http://www.example.com , then the site will open as if the browser was disabled by JS (and without CSS formatting).

I tried in IE, Firefox and Chrome. The problem arises sequentially.

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

If so, is there a way to give the user continuous experience, no matter how he landed on the site? Perhaps redirecting him to the http site, even if he used only www .

+7
source share
3 answers

Yes. www.example.com is a subdomain of example.com . As a rule, they are one and 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 to simplify the processing of cookies. Others still (very few) host completely different websites.

+11
source

Try redirecting www.mysite.com to mysite.com. You can achieve this by modifying the .htaccess file. It is also well suited for search engine optimization, because with respect to search engines these two are separate entities. When redirecting, you tell search engines that they are both the same.

+2
source

Although most ready-made vhost configurations will handle two of the same, you can configure it to behave like two different sites.

+1
source

All Articles