• Welcome to DNForum.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars
    If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the oldest global domain name community on the internet and continues to grow every day. There are over 45,000 domainers on DNForum doing everything from buying domains, selling domains, using our free in-house built tools, learning about domains and discussing domains. Take a minute and Register.

Wanted: Service Programming Help

Status
Not open for further replies.

jdk

DNF Addict
The Originals
Legacy Exclusive Member
Joined
Jul 23, 2004
Messages
6,352
Reaction score
28
I am looking to make my site go to www.domain.com each time the user types in domain.com For an example check out Google, you can enter www.google.com or google.com into your address bar and it opens up www.google.com
 
hello,

put this in .htaccess file in the main directory of your webiste

RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
 
Wow that's helpful!
 
no problem guys :) glad to help!
 
hmmm... just out of curiosity, is this for SEO reasons? I am just wondering, because if so, i would love to do this to all my sites as well.
 
mmkrulz said:
hmmm... just out of curiosity, is this for SEO reasons? I am just wondering, because if so, i would love to do this to all my sites as well.

Yes, I am playing around with the fact a site of mine has PR 6 with the www and PR 4 w/o the www, so if I do this code all links picked up should have www in them making my PR higher with the www. This is only a test and I do not know how it will turn out.

If anyone has any comments please post as I am interested if this would help or hurt your PR or SEO.
 
301 Redirects are acceptable by the search engines , so i dont think any problem is there to use this code.

:-)
 
Status
Not open for further replies.
Back
Top Bottom