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!

Redirect webmail to https

Discussion in 'General Discussion' started by sksanthosh17, Oct 23, 2018.

  1. sksanthosh17

    sksanthosh17 Registered

    Joined:
    Oct 23, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chennai
    cPanel Access Level:
    Root Administrator
    We are trying to redirect "webmail.domain.com" from http to https in .htaccess file, but we couldn't get redirected.

    RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    This only works for main domain "domain.com"

    We need both Primary and all subdomains to be redirected to https

    Kindly suggest a rule to get redirected

    Thanks in advance:)
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,208
    Likes Received:
    478
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @sksanthosh17


    Proxy subdomains are a bit different than normal subdomains. You can force SSL by going to WHM>>Server Configuration>>Tweak Settings -> and enable:

    Require SSL for cPanel Services
    This option forces the server to redirect unencrypted cPanel, Webmail, WHM, and DAV requests to secure ports according to the SSL redirection settings. If “Choose the closest matched domain for which that the system has a valid certificate when redirecting from non-SSL to SSL URLs” is enabled, the system will redirect to the best-matched certificate for the domain. If “Choose the closest matched domain for which that the system has a valid certificate when redirecting from non-SSL to SSL URLs” is disabled, the system will redirect to the https:// URL for the domain, even if no valid certificate exists for the domain.

    Thanks!
     
    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