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.

Redirecting SSL to Domain?

Discussion in 'Security' started by reaper75, Mar 27, 2012.

  1. reaper75

    reaper75 Registered

    Joined:
    Mar 27, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,
    My SSL is all set up on my IP and it shows associated with my Domain name, but when you type in the Domain name, it goes to the unsecured site. How do I redirect it so that any time the name is typed in it goes to the https:// heading every time? Any help greatly appreciated. :)
     
  2. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    You are talking about a conocial redirect basically. Are you referring to WHM side of things or a web site.

    If WHM you can do this easily through
    WHM - tweak settings - security - require SSL
     
  3. reaper75

    reaper75 Registered

    Joined:
    Mar 27, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    No, it goes secure on WHM no problem. I'm talking about redirect at the domain (site) it was made for. Thanks for any help. I don't understand why it's not working I can see my domain with the certificate beside it in SSL settings. It's just not functioning on the domain, just on Cpanel or IP base login:confused:
     
  4. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    I think you are looking for this. Use mod_rewrite in the .htaccess of the site in question to redirect to the secure port if the insecure method is used.

    Code:
    RewriteEngine On
    
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://<yourdomainname.tld>/$1 [R,L]
    
     
Loading...

Share This Page