Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   To www. or not to www. (http://www.greenguysboard.com/board/showthread.php?t=58890)

Mike-mijen 2010-09-08 03:52 PM

To www. or not to www.
 
I was wondering. Does it make a difference to add www. to the links or not? Example: http://greenguysboard.com or http://www.greenguysboard.com
Just wondering. |huh

Cleo 2010-09-08 04:02 PM

Do whatever you want but always do it the same.

Simon 2010-09-08 04:14 PM

You can use your .htaccess file to ensure that all pages load the way you want, with or without the "www." so all bookmarkers and spiders will see the address you want to favor.

Here's an example of what goes in the .htaccess file if you want to use the www...

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]

That's all. And just edit as necessary if you want things the other way.

HTH

cd34 2010-09-08 04:38 PM

Code:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]

You might want to set an exclusion rather than an inclusion, otherwise http://somethingelse.domain.com/ would still fall through.

Mike-mijen 2010-09-08 04:41 PM

Cool. I just was not sure if made a difference in big skeem of things.

Simon 2010-09-08 06:41 PM

Quote:

You might want to set an exclusion rather than an inclusion, otherwise http://somethingelse.domain.com/ would still fall through.
How would doing it that way affect subdomains that actually are in use on that domain?

cd34 2010-09-08 09:41 PM

if they are separate virtual hosts, it wouldn't change anything. But, if you have subdomains hitting the same virtual host, it would affect them.

terry 2010-09-09 08:50 AM

I believe SE's will treat them as seperate websites. With that said, duplicate content is something to consider. Add to that links to your site that either use the www or not - that will affect your page rank.
I say pick your fav and stick to it. Using a redirect in your htaccess (301) as mentioned is the way to go.

Mike-mijen 2010-09-09 01:35 PM

Cool Thanks


All times are GMT -4. The time now is 01:59 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc