The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cpanel Parked Domains Problem / Redirects Cpanel Error

Discussion in 'General Discussion' started by SludgeMeister, Oct 1, 2009.

  1. SludgeMeister

    SludgeMeister Member

    Joined:
    May 8, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    We have domain.com as the primary domain for the site in question.

    We migrated from DirectAdmin to Cpanel a few months ago. DirectAdmin allowed "Domain Pointers" (aka Redirects) to be pointed at the domain.com. We own domain.org/.net/.co.uk which all were simply pointed at domain.com so when someone visited www.domain.co.uk it redirected to www.domain.com

    When we started up with Cpanel we used the "Park Domain" option which unfortunately has simply mirrored the site. e.g.

    If someone visits www.domain.co.uk it remains as domain.co.uk/page.html rather than redirect to www.domain.com/page.html

    As a result, Google et al have picked up both domains/sites and we are getting penalised for duplicate content.

    I am assuming the best way to tackle this is to generate rules within htaccess to solve it.

    I have tried several combinations of htaccess rules to permenantly redirect any visitors who come to the site from www.domain.co.uk so it simply redirects them to www.domain.com but I haven't been able to get any to work. Some I've tried:

    Code:
    RewriteCond %{HTTP_HOST} ^domain.co.uk$ [OR] 
    RewriteCond %{HTTP_HOST} ^www.domain.co.uk$ 
    RewriteRule ^(.*)$ "http\:\/\/www\.domain\.com$1" [R=301,L]
    Code:
    redirectMatch 301 ^(.*)$ http://www.domain.co.uk
    redirectMatch permanent ^(.*)$ http://www.domain.com
    Code:
    Redirect 301 http://www.domain.co.uk http://www.domain.com
    What I need to do of course is preserve the entries within the search engines. So for example any entries that are present for www.domain.co.uk/about-us.html need to be redirected to www.domain.com/about-us.html

    After requesting some help on the WHT forum a helpful member there suggested the following:

    So I have tried this before trying the htaccess solution, however I am having some problems. When I try to follow the above in Cpanel I get the following error:

    There was a error adding redirect.

    I am unsure what is causing this.

    I'd appreciate if someone could help me with this issue.

    Thanks,

    Tom
     
  2. SludgeMeister

    SludgeMeister Member

    Joined:
    May 8, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Anyone able to help me with this? :)
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    In your cPanel interface, click on "Parked Domains."

    Now click on "Manage Redirection."

    Here, type domain.com as the URL you want domain.co.uk to redirect to.

    Save the settings. If this does not work, please let me know. I tested this on a server running the latest 11.24 RELEASE.
     
  4. SludgeMeister

    SludgeMeister Member

    Joined:
    May 8, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi DavidG,

    Unfortunately the same error occurs.

    I have submitted a ticket to the Cpanel Support Desk (ID: 499885).

    Thank you,

    Tom
     
  5. cPanelGregK

    cPanelGregK Administrator
    Staff Member

    Joined:
    Sep 8, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    This one actually threw me for a loop for a few. Then I found that .htaccess was interfering, so I moved it out of the way and created a new .htaccess with the 301 redirects, and it worked properly.

    That meant that something in Joomla's .htaccess was interfering, so I moved the original .htaccess back, and put the 301 Redirects at the very top of .htaccess, and they worked properly.
     
Loading...

Share This Page