Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Forward domain/cpanel to cpanel.domain/

Discussion in 'General Discussion' started by Shane3673, Aug 28, 2014.

  1. Shane3673

    Shane3673 Well-Known Member

    Joined:
    Dec 20, 2013
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I have look everywhere to see if you can do this, but it seems most people want to do the opposite. I have a wildcard SSL cert installed for the main domain and all services. Currently for all of the other domains I created subdomains for cpanel and webmail that forward to the main domain. Ex.

    cpanel.domain2.com forwards to cpanel.domain.com

    This forces users to login to use the main domains login in order to use the wildcard cert and then they don't get the untrusted site error. This works great.

    If I use www.domain.com/cpanel, I don't get a error because the wildcard cert, but if I use www.domain2.com/cpanel I get the error because the cert is not for that domain. If I can forward www.domain2.com/cpanel to either cpanel.domain.com or www.domain.com/cpanel it will work with the cert. I have tried to setup a standard forwarder both ways but it does not work. It loads the service before the forwarder can forward it.

    Is it possible to forward www.domain2.com/cpanel to cpanel.domain.com?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Shane3673 likes this.
  3. Shane3673

    Shane3673 Well-Known Member

    Joined:
    Dec 20, 2013
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Re: Forward www.domain.com/cpanel to cpanel.domain.com

    Thank you for pointing me in the right direction.
     
  4. Shane3673

    Shane3673 Well-Known Member

    Joined:
    Dec 20, 2013
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Re: Forward www.domain.com/cpanel to cpanel.domain.com

    This is the one that helped me:

    http://forums.cpanel.net/f5/preserving-httpd-conf-changes-125733.html

    CPKenneth's answer

    After this it still would not redirect using the redirect in cpanel (shows blank webmail folder) for some reason.
    Created a redirect page with this code only <meta http-equiv="refresh" content="0; URL=http://webmail.domain.com">
    Named it index.html
    Dropped it into the www/webmail folder for each domain including the main one
    Now www.everydomain.com/webmail goes to webmail.domain.com and can use the SSL cert for that domain without an untrusted error
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice