301 redirect / Duplicate Content

Posted on 2010-01-08
Last Modified: 2012-05-08
Hello Experts,

I have registred 4 different domains:

Currently all Domains are redirected to the same Host, so a visitor gets the same content whatever domain he uses.

I would like to change that now - i only want to the use the testdomain.COM as the main domain, and redirect like the following: --> --> -->

My questions are the following:

1. How can I realize that regarding that I want my indexed google links to work also in the future. I read sth about a 301 redirect but I´m not sure about that.

2. Will Google regard my content as duplicate content, since i still have the same content on
(and also of course itself)
Question by:bibabutze
    LVL 2

    Expert Comment

    1. With 301 redirect everything will be fine. It is normal method

    2. No, Google will think that those domains are mirrors
    LVL 26

    Accepted Solution


    I take there is a DNS 'A' record, for "", while:
    are just CNAME entries ( to that domain, you can check via a DNS lookup e.g.

    If "" is just another CNAME, and your using a shared IP and an Apache name based virtual hosts then ignore most of the following.

    What you need to do depends on what you plan to do with the sites:
    1) Will the be identical copies / same document root?
    2) If not identical copies, then how much are you to differentiate the sites / structure the content?
    3) Are you looking to add HTTPS / an SSL certificate to any of the variants?

    If HTTPS access is requied,  then to avoid browser warnings you'll want to register / add 'A' records for the new:

    And have the the existing CNAME entries modified to point to the new 'A' records: -> -> ->

    Along with setting up new virtual hosts / generating new SSL certificates for each country.

    If no HTTPS access is required you could get away with 3 more CNAMES to the main host, and a few more name based virtual hosts in apache, again all depends what you want / plan to do.

    If the sites are to share content you'll need to scan through your site to ensure all local page links are relative, else they'll end up changing domain's as they browse.

    Anyway you'll probably want a rewrite rule, along the following lines, in you httpd.conf, to eliminate the old localised site variants.
    RewriteEngine On
    RewriteCond %{HTTP_HOST}    testdomain\.(de|ch|at) [NC]
    RewriteRule   .*  {REQUEST_URI} [L,R=301]

    Also gets more involved if you have multiple web-servers and a Load balancer.

    LEt us know if this is enough or if you require more assistance.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    This video discusses moving either the default database or any database to a new volume.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now