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.

SSL/TLS Domain Issue

Discussion in 'Security' started by tdot, Jan 18, 2018.

  1. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    25
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    I have installed and enabled LetsEncrypt script in AutoSSL and it has been issued on all my domains The Let's Encrypt Plugin - cPanel Knowledge Base - cPanel Documentation

    For some reason when I visit any of my domains it defaults to none-https. The only service/domain that has https enabled by default is whm/cpanel. Is there a way to fix this issue?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,455
    Likes Received:
    1,608
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This is normal unless you enter "https" in the address bar of your web browser. You could setup a redirect for each website using the instructions on threads like this one:

    SOLVED - Auto Force TLS

    Thank you.
     
  3. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    25
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Create a .conf file in this directory /etc/apache2/conf.d/userdata or create a userdata.conf file in /etc/apache2/conf.d/ ?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,455
    Likes Received:
    1,608
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    25
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    I'll take a look at that thanks
     
  6. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    25
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Used the following steps. It still doesn't seem to work. Is there something I am doing wrong?

    Logged in as root
    Created userdata directory under /etc/apache2/conf.d/
    Uploaded includename.conf to /etc/apache2/conf.d/userdata/
    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
    
    /usr/local/cpanel/scripts/rebuildhttpdconf
    /usr/local/cpanel/scripts/restartsrv_httpd
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,455
    Likes Received:
    1,608
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Try running the following command as well:

    Code:
    /usr/local/cpanel/scripts/ensure_vhost_includes --all-users
    Thank you.
     
  8. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    25
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi, I have run that command. The domains are still not defaulting to https. Is there something else that could be misconfigured?

    In the config file, I've tried -
    RewriteCond %{HTTPS} yes
    and RewriteCond %{HTTPS} no
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,455
    Likes Received:
    1,608
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Have you tried clearing your browser cache or uploading a test HTML page and accessing it directly to rule out any issues with your browser cache or script configuration?

    Thank you.
     
Loading...

Share This Page