HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   www and non-www (

petergus 26th July 2012 16:30

www and non-www
confused about the www and such.

at the moment i can only get to my sites with www and when i used just it goes to a common page saying its on a shared IP.

i thought this was the hostname when setting up a site, but www is always there even if i try to remove it...?

what i want is to use NON-www (just http) by default and www should redirect to that.

createch 26th July 2012 17:25

Please set up a co-domain

e.g. For
(hostname: www, domain:

you should set up a co-domain:
(hostname: blank, domain :


petergus 26th July 2012 17:37

right. and this will not lead to duplicate domain issues?

google often says you should have www or non www, not both, so one needs a 301 redirect or so.

createch 26th July 2012 18:55

Let me explain in greater depth.....

Actually internet works in this way:

When someone types in a web browser, it will first resolve thru the DNS system to an IP address and then redirect the traffic to that particular IP (a web server).

And the webserver, assuming it is running Apache, will have a http.conf file, containing the information of the virtualhost, and then display the website in that directory. (this information of the directory is specified as the DocumentRoot of the virtualhost)

By setting a co-domain "", the virtualhost directive will contain a server alias, telling that both "" and "" are actually pointing to the same DocumentRoot, hence the user will see the same thing for both "" and "".

ISPconfig 2 supports easy setting of co-domain.

I don't see there is anything related to 301 redirect or what you called "duplicate domain issues"

petergus 26th July 2012 19:37

thanks for that :)

*my* understanding of all this is that the www is like a subdomain and therefore a separate domain, and if both show the same content, well it shouldn’t be a problem, but i just remember on my old server (with some panel of who knows what, "dream"host ;) ), if i selected no www, then typing in www would redirect, or change to non www.

All times are GMT +2. The time now is 11:37.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.