HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   www and non-www (http://www.howtoforge.com/forums/showthread.php?t=58084)

petergus 26th July 2012 15: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 http://domain.com 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 16:25

Please set up a co-domain

e.g. For www.abc.com
(hostname: www, domain: abc.com)

you should set up a co-domain: abc.com
(hostname: blank, domain : abc.com)

Regards,
Createch

petergus 26th July 2012 16: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 17:55

Let me explain in greater depth.....

Actually internet works in this way:

When someone types http://www.abc.com 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 "abc.com", the virtualhost directive will contain a server alias, telling that both "abc.com" and "www.abc.com" are actually pointing to the same DocumentRoot, hence the user will see the same thing for both "http://abc.com" and "http://www.abc.com".

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 18: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 14:50.

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