Best way to redirect a website in Magento

Soft Redirection

We usually perform a soft redirection from website_a to website_b. This involves setting up an index.php which has a javascript redirection which is activated as soon as the page loads. This means that there is a slight delay in the redirection but is generally not noticed by people. If the javascript fails for instance if the person visiting the website has javascript disabled, a link is presented which may be clicked to traverse to the target website. Both forms of redirections will appear in google analytics under the referrer field.

301 Redirection

301 redirections still have their place and is generally reserved for SEO reasons. If we wish for all the SEO juice to be transferred from website_a to website_b then a 301 redirection is the best way to do this.

Google analytics

Google analytics is very important for a lot of website owners. If you setup a 301 redirection which is the normal way to redirect a website it will mean that google won't be able to track which website was redirected from which. So for example if website_a redirects to website_b, google won't know that someone visited website_a first. This piece of information could be important if you wish to know how many people are visiting your initial website.

Better in the future

By performing a soft redirection on a website allows us to store the original website on a different server and a different ip address as the target website. This is great for the future use of the original website. Basically it means there is a seperation between website_a and website_b. In the future you may wish to stop using the redirection and have a full website built on website_a which is easier to do when both websites are viewed as a separate website. This means it won't be tied to website_b which should give you the freedom to perform SEO on it without any previous baggage that a 301 redirection may contain.