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!

Solution for webmail.domain.tld not redirecting to actual cPanel webmail login

Discussion in 'E-mail Discussion' started by fevangelou, Oct 10, 2010.

  1. fevangelou

    fevangelou Member

    Joined:
    Oct 10, 2010
    Messages:
    24
    Likes Received:
    5
    Trophy Points:
    53
    Location:
    Athens, Greece
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I have found that the redirect from webmail.domain.tld to domain.tld:2095 (the webmail port of cPanel) may not work on all servers.

    So here's a simple .htaccess rule which you can set at the root of a cPanel account so it can affect all add-on domains and best of all, it does not have a hardcoded domain on it :)

    Code:
    # Redirect webmail.domain.tld to domain:2095 for cPanel Webmail only
    RewriteCond %{HTTP_HOST} ^webmail\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/webmail/$1 [R=301,L]
    
    This will make sure webmail.domain.tld is redirected to domain.tld/webmail which in turn cPanel will push to domain:2095 - aka your webmail login. :)

    Enjoy!

    P.S. If your domain.tld/webmail is not redirecting properly, just go to WHM's "Tweak Settings", scroll down to the "Redirection" section and make sure "Always redirect users to the ssl/tls ports when visiting /cpanel, /webmail, etc." is not selected. I've seen this occur on VPS.NET for the record.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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