There are a few questions that are inherently present inside the main question. Those questions are:
- What is the best way to perform this type of redirect? (Presumably a 301 Perma for SEO Best practices. You will retain 90%-99% of your link juice.)
- At what level would you perform the redirect? Would you do it at the registrar level, in the cPanel/direct admin/etc, or would you perform this task in the .htaccess file? (Presumably the .htaccess file)
- There are so many ways you can redirect from one domain to another how do we webmasters who can't read Apache directives know which is the best one to use? It can't be as cut and dry as "Just use any that works".
As there are multiple ways to accomplish this task, the task of redirecting one domain to another, the PRIMARY CONCERN of this question is what is the BEST WAY to accomplish this task, perform a redirect, and do it properly Below are a few of the examples I have seen (on this site and other sites):
1.
``Redirect 301 / http://www.newdomain.com/`
``Options +FollowSymLinks`
``RewriteEngine on`
``RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L`
``Options +FollowSymLinks`
``RewriteEngine on`
``RewriteCond %{HTTP_HOST} \olddomain.com$`
``RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]`
`Options +FollowSymlinks`
``RewriteEngine On`
``RewriteCond %{HTTP_HOST} ^olddomain.com [NC]`
``RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]`
``RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]`
``RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]`
``RewriteEngine on`
``RewriteCond %{HTTP_HOST} !^www.your_domain.com$`
``RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]`
Your assistance in this matter is priceless I have been trying to get a straight answer to this question for months. Even other people I see ask this question or questions similar receive the same answer even though our problems are sightly different or largely different. If you can, when you answer this, please explain to me why the redirect method you choose to answer with is the best one, why it's the best, and how it works,. Please break down the Apache directive so that myself, and other who come after me understand not just how to copy and paste a redirect but the particulars as well.