SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Location
    Sydney, Australia
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile One website: two domains - how to avoid duplicate content?

    Hi,
    I'm working with a client who currently has two domains. Instead of just redirecting domain A to domain B, the whole site has been duplicated. Not sure why their previous web developer set it up this way as it seems like a messy way of setting things up: SEOgets diluted and two sites need to be maintained. What would be the benefits?

    Anyway, I am building a new site for my client and simply want to redirect domain B to domain A. The site only exists at domain A. I can easily set this up, however I'm concerned that all the domain B pages that have been indexed by Google will now return 404 errors.

    Is there a way to redirect all the domain B pages to domain A? Do I simply do this on the hosting company's cPanel OR do I need to set up a rewrite file of some sort?

    Thanks.

  2. #2
    SitePoint Member Axeny's Avatar
    Join Date
    Jul 2013
    Location
    Bulgaria
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Copy/Paste in .htaccess file of domain B and change newdomain.com to domain A

    Code:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !newdomain.com$ [NC]
    RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]

  3. #3
    SitePoint Member
    Join Date
    Aug 2013
    Location
    Berlin, Germany
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could also make a landing or intro page for each domain that links to your main site but also can be used to post some more content that is optimized for the keywords of that specific domain.

  4. #4
    SitePoint Mentor silver trophybronze trophy
    Mikl's Avatar
    Join Date
    Dec 2011
    Location
    Edinburgh, Scotland
    Posts
    1,606
    Mentioned
    66 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by whatachamp View Post
    I am building a new site for my client and simply want to redirect domain B to domain A. The site only exists at domain A. I can easily set this up, however I'm concerned that all the domain B pages that have been indexed by Google will now return 404 errors.
    No they won't. If you do a 301 redirect from each page in B to the corresponding page in A, then they won't generate 404s. Furthermore, any page rank that B previously enjoyed will now pass to A.

    Mike

  5. #5
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mikl View Post
    No they won't. If you do a 301 redirect from each page in B to the corresponding page in A, then they won't generate 404s. Furthermore, any page rank that B previously enjoyed will now pass to A.

    Mike
    Correct. Everything he said.

  6. #6
    SitePoint Enthusiast seoexperttools's Avatar
    Join Date
    Aug 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have always been wondering that is there any difference between redirecting one of your domain to another using .htaccess and the redirecting function provided by the domain provider?
    "People are like dice, we throw ourselves into life."

  7. #7
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by seoexperttools View Post
    I have always been wondering that is there any difference between redirecting one of your domain to another using .htaccess and the redirecting function provided by the domain provider?
    I always assumed the domain provider just inserts the htaccess code for you. Im 99% sure thats the case.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •