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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

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

  1. fevangelou

    fevangelou Member

    Oct 10, 2010
    Likes Received:
    Trophy Points:
    Athens, Greece
    cPanel Access Level:
    DataCenter Provider
    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 :)

    # 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. :)


    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.

Share This Page