Mobile app version of vmapp.org
Login or Join
Kevin317

: Why does my site only work with a www in the URL? I'm a bit confused as the following points: There is a simple text website, with no javascript, that works only with the prefix. http://www.mysite.corporation.com

@Kevin317

Posted in: #Apache #Domains #NoWww #Subdomain

I'm a bit confused as the following points:


There is a simple text website, with no javascript, that works only with the prefix. www.mysite.corporation.com works but http//mysite.corporation.com will not work. What could be going on?
I run a few LAMP vps' and don't recall ever having trouble with the leading www
Why do people write URLs with a Is there some history behind this?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin317

2 Comments

Sorted by latest first Latest Oldest Best

 

@Murphy175

URL for site have not any relation to using or not using any web-technologies on site. It's a question of DNS-settings of domain and configuration of web-server, which serve site
Read zone definitions for sites domains from these vps and find difference. In Bind jargon adding to domain
@ IN CNAME www

www IN A NN.NN.NN.NN


leads to "cloning" of host www address to the address of domain. And if in web-server config for www-site domain-name aliased in any form to www, both URLs will show same content.

DNS and Web config changes must be done by hand

10% popularity Vote Up Vote Down


 

@RJPawlick198

Basically www is just a subdomain. The reason the specific site doesn't work without the www subdomain can either be a misconfigured DNS or a misconfigured configuration.

You can try to do a nslookup to find out to which IP's they are assigned (to check the DNS settings are correct):

Example of my own domain:

nslookup responsible-disclosure.com
Server: router.home
Address: 192.168.1.254

Niet-bindend antwoord: (non-authoritive answer in english I think)
Naam: responsible-disclosure.com
Address: 46.105.30.3




nslookup responsible-disclosure.com Server: router.home
Address: 192.168.1.254

Niet-bindend antwoord: (non-authoritive answer in english I think)
Naam: responsible-disclosure.com Address: 46.105.30.3


If those two match you're Apache (vhost) might be misconfigured. If you don't see the misconfiguration you need to add you config nito the question so we can take a look.

As to why people prefix the URL with www check out Wikipedia:


Many domain names used for the World Wide Web begin with www because of the long-standing practice of naming Internet hosts (servers) according to the services they provide. The hostname for a web server is often www, in the same way that it may be ftp for an FTP server, and news or nntp for a USENET news server. These host names appear as Domain Name System (DNS) subdomain names, as in example.com. The use of 'www' as a subdomain name is not required by any technical or policy standard; indeed, the first ever web server was called nxoc01.cern.ch,[26] and many web sites exist without it. Many established websites still use 'www', or they invent other subdomain names such as 'www2', 'secure', etc. Many such web servers are set up such that both the domain root (e.g., example.com) and the www subdomain (e.g., example.com) refer to the same site; others require one form or the other, or they may map to different web sites.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme