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.

Domain Forwarding - 301 redirect

Discussion in 'General Discussion' started by jimfurtado, May 13, 2004.

  1. jimfurtado

    jimfurtado Member

    Joined:
    Jan 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Somerset, Massachusetts, United States
    Is there any way to setup Domain Forwarding within cPanel to return a 301 (permanent) instead of 302 (temporary) redirect status?

    Using 301 redirects are important for Google page ranks. I'm combining three web sites into one and don't want to lose my ranking.
     
  2. rvskin

    rvskin Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    400
    Likes Received:
    1
    Trophy Points:
    18
    I believe that in Cpanel under Redirect option. There are 'Permanent' and 'Temporary' redirections. You should test it.
     
  3. jimfurtado

    jimfurtado Member

    Joined:
    Jan 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Somerset, Massachusetts, United States
    Using cPanel's redirects doesn't help me. I'm using Domain Forwarding to point domains to a new url:

    olddomain1.com --> newdomain.com
    olddomain2.com --> newdomain.com
    olddomain3.com --> newdomain.com

    So olddomain1.com doesn't have it's own account.

    As it stands now, Web Host Manager *almost* does exactly what I want. Typing in http://www.olddomain1.com/anydirectory/ points to http://www.newdomain.com/anydirectory/

    The only problem is it returns a 302 redirect status.
     
  4. rvskin

    rvskin Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    400
    Likes Received:
    1
    Trophy Points:
    18
    Why don't use Park Domain Feature?
     
  5. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    This is to due with Apache, not any specific Control Panel.

    Once redirection is setup an entry is made in the .htaccess file. As Redirect is temporary by default you need only edit the .htaccess file to read: Redirect Permanent ....
     
  6. jimfurtado

    jimfurtado Member

    Joined:
    Jan 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Somerset, Massachusetts, United States
    I've looked at the htaccess files and httpd.conf. Domain Forwarding doesn't use the htaccess files. Domain Forwarding uses domainredirect.cgi within httpd.conf based on entries within the domainmap file.

    Now, I could just manually edit the httpd.conf and add redirection. But, if I can make the changes through cPanel, I'd be consistently using the interface.
     
  7. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    At first, I didn't know what you were talking about or using. After checking in an httpd.conf file and not finding the 'domainredirect.cgi' you referred to, but noticing you mentioned 'in WHM', I had a look and sure enough, there it was:

    WHM > DNS Functions > Setup/Edit Domain Forwarding << is this new?

    Never having used this feature I'm not familiar with what it does.

    I had presumed you were referring to an account and the account owner was using what is available within Cpanel. That is how one gets an .htaccess file happening for redirection.


    Why would you be using WHM for redirection? Wouldn't it be better to have the account owner do their own redirection?
     
  8. jimfurtado

    jimfurtado Member

    Joined:
    Jan 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Somerset, Massachusetts, United States
    Website Rod, thanks for trying to help.

    I set up the forwarding within WHM because that's the only place I could find it.

    The domains I want to forward are parked domains, not fully setup accounts. Within cPanel I can redirect subdirectories but I don't see any way I can redirect parked domains. Simply parking the domains doesn't work for me because I want domain.com to display in the address bar whenever domain2.com, domain3.com, and domain4.com are requested. I'd also prefer to have the redirection done in httpd.conf, rather than in .htaccess, so that server performance doesn't take a hit.

    I'm reading the O'Reilly books on Apache and Bind currently, so I'll eventually figure out how to do this manually. It would be easier, though, if I could set this up correctly with WHM or cPanel.
     
  9. simoncox

    simoncox Registered

    Joined:
    Jan 20, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Since Google started to penalise domains for containing the same content as other sites Parking no longer looks like a valid tactic for spare domains. It does seem somewhat stupid to have to create accounts for each domain just to enable .htaccess to return a 301 but this is what Google needs.

    Being able to do this in WHM would be brilliant - so has any one figured out what to do yet?
     
  10. jeffyjoe

    jeffyjoe Member

    Joined:
    Dec 10, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    im also eager to find out if anyone has figured this out
    i want the same thing as jimfurtado is trying to do

    it seems simple enough a question
     
  11. andyg

    andyg Registered

    Joined:
    Jul 21, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    me too..

    yep another one looking to do this and stumped. Have spent all afternoon trying to figure it out so far, and with around 40 domains involved really don't wanna have to create an account for each. Apart from anything else it would be a pain to manage. Anybody got any ideas??

    Changing WHM to do a 301 instead of a 302 when the domain forwarding option is used would be ideal (as suggested above), but I can't work out how to do it.

    Thanks to anybody that can help.

    Andy
     
  12. shakmatay

    shakmatay Registered

    Joined:
    Jun 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    domain forwarding

    I've searched the cPanel forums (reading scores of threads), but still have not found a satisfactory answer to the same question raised in this thread, i.e. How does one use cPanel/WHM to forward an "entire domain" to another domain (so that the new domain shows in the browser window).

    This is preferable for seo purposes (from what I've read).

    What I did find from another source, was the suggestion to log into one's domain registrar and perform the domain forwarding in there.

    I did exactly that... in GoDaddy, I was able to "check" several domains in one step, and forward them all (via 301 permanent redirect--advanced option) to the new domain.

    ~Shak

    P.S. When I earlier tried to do a domain forward in WHM (clicking "Setup/Edit Domain Forwarding" in the DNS Functions section), it told me... "system has no free ips."

    And looking at "re-direct" feature in cPanel, it doesn't have the necessary fields to enter "other domains" that you wish to redirect to a new domain.
     
    #12 shakmatay, Jun 28, 2010
    Last edited: Jun 28, 2010
  13. Siteman

    Siteman Member

    Joined:
    Nov 15, 2008
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I use .htaccess to do 301 redirects from <SOURCEDOMAIN> to <TARGETDOMAIN>:

    Code:
    RewriteEngine on
    
    # Redirect any access to site to a different domain
    RewriteCond %{HTTP_HOST} <SOURCEDOMAIN>$ [NC]
    RewriteRule ^(.*)$ http://<TARGETDOMAIN>/$1 [R=301,L]
    Hope this helps :)

    S.
     
  14. melisa12345

    melisa12345 Registered

    Joined:
    Aug 17, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    i am also eager to find out if anyone has figured this out.I am the another one looking to do this.:confused:
     
Loading...

Share This Page