Forum Moderators: phranque

Message Too Old, No Replies

Finally Getting Around to the 301 Redirect

.com, .net, .org

         

rocknbil

5:56 pm on May 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A long time ago an administrator told me the easiest way to manage multiple .tld's is to just point them all to the same domain. This has finally floated to the top of my to-do list and sounds like a huge mistake. My G site: searches -

.com 1,110
.net 64
.org 59

I'm presuming the minor two are so low because of duplicate content, and these two are probably dragging down the .com.

So I've spent an entire morning reading through the horror stories and successes of 301's here, and will set up 301's for the two "minor" domain names and index.html as specified in the various excellent threads on this topic.

My question: I have a dedicated server and the ability to set up the .net and .org domains as separate domains/server directories at no additional cost. Would there be any advantage in doing so, placing the 301 redirect in an .htacess at the root of those domains, or just leave the DNS pointing to .com and perform the redirect from there?

The site is two years old, 12K month and growing, not displeased with the current results but of course am constantly refining.

g1smd

10:19 pm on May 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I point all domains at one physical server space and then do all the redirects in one .htaccess file there.

If the .htaccess file would ever be deleted you would be in trouble. Make sure that never happens.

You could have multiple hosting accounts, but that would be a waste of a hosting plan just to host one small .htaccess file.

jdMorgan

1:40 am on May 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't see a big advantage one way or the other: Either a common redirect in httpd.conf or in .htaccess, or a separate redirect in separate VirtualHost containers.

If you are more comfortable using one method or the other, or prefer one method because it fits well with how you like to track and maintain things, use that method.

Jim

rocknbil

9:34 pm on May 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like "less is more," how's this?

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

This actually would manage my .net and .org as well as any non-www requests, correct?

I will have to verify none of my SERP links are non-www, hate to lose the relatively poor position I already have. :-(

jdMorgan

9:53 pm on May 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's fine, as long as the missing space between "}" and "!" is an artifact of posting here...

Yes, any request for any domain NOT www.example.com will get redirected to www.example.com.

PR will "flow through" one 301 redirect, but not more than one. Make sure that any other redirects you need are above this one. For example if you add code to canonicalize "index.html" to "/", put that code above this domain redirect rule.

Any internal rewrites should then follow the domain redirect.

Jim