Computer Programming web Web programming Tips

How to use multiple domains
for one web site. 301 Redirect

By Sergey Skudaev

On this page I will show you different methods for 301- Redirect. The 301 redirect allows redirecting visitors from one URL to the other URL. Why we would need it? We may have few different reasons for redirection. One of them is using few domain names for the same web site. It is possible to use few domains for one web site. However, It is important not to create a condition, when the same page can be accessed by more that one URL. If the same site can be accessed by two or more URL, then Google will consider the site accessible through one domain as a duplicate of the site accessible through the other domain. To avoid such situation you can use 301 Redirect.

Let me explain you how I solved this problem for my web site. First, I registered few domains for the same site:,, and My primary domain is In my host control panel I found Addon Domains icon.

Host control panel - Addon domain icon

I clicked it, and added domain as Addon domains.

Create Addon domain

After that, I clicked Redirects icon and redirected Addon domain to the primary domain. Then I added the domain as Addon domain and in the same way, I redirected it to the primary domain.

301 Redirect Addon domains

Now both Addon domains are redirected to the primary domain.

My domain was added as Addon domain to my different host with the primary domain

To redirect to the domain, I used the following script in .htaccess file, which is located in my root directory for the domain.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^$ [OR]
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^(.*)$ "http\:\/\/www\.best\-your\-trip\.com$1" [R=301,L]

Now all three my Addon domains:, and are redirected to the primary domain:

I had one more problem. I had a web page with photos of the Honeymoon Island Park on a web site with the primary domain name "". I moved this web page with the Honeymoon photos to the web site with domain. But in google search index my old URL to the honeymoon.php page still exists.

Now I had to redirect the page to the

In the .htaccess file, which is located in my root directory for the, I typed the following script:

Redirect 301 /honeymoon.php

Now, if a user finds an old URL in Google search, he will be redirected to the new page location.

Besides, I redirected all my domains without www to domains with www, using the following script in the .htaccess file.

RewriteEngine on RewriteCond %{HTTP_HOST} ^$ RewriteRule ^/?$ "http\:\/\/www\.configure\-all\.com" [R=301,L]

My eBooks on


No comments yet.

Add Comment

* Required information
(never displayed)
Smile Sad Huh Laugh Mad Tongue Crying Grin Wink Scared Cool Sleep Blush Unsure Shocked
What is the opposite word of weak?
Enter answer:
Enter code:
Notify me of new comments via email.
Remember my form inputs on this computer.
I have read and understand the privacy policy. *
I have read and agree to the terms and conditions. *
Powered by Commentics