Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Nov 2004
    Posts
    39

    Question only secure "https://" possible?

    Hello All:

    A simple question:
    Is it possible (in WHM) to set a domain hosting account up, so that it is ONLY accessible via https://.... and not http://... Someone trying to access http://domain.com would then be forwarded to https://domain.com -- is that possible, can this be set up? If so, how?

    Thanks for your input.


    John

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by basic View Post
    Hello All:

    A simple question:
    Is it possible (in WHM) to set a domain hosting account up, so that it is ONLY accessible via https://.... and not http://... Someone trying to access http://domain.com would then be forwarded to https://domain.com -- is that possible, can this be set up? If so, how?

    Thanks for your input.


    John
    You could set up a redirect rule to direct traffic going to http:// to go to https://. This can be done by using mod_rewrite directives in .htaccess. You can find information on how to do this at:

    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

  3. #3
    Member
    Join Date
    Nov 2004
    Posts
    39

    Default

    Thanks!

    To anyone else interested -- this works:

    I edited the .htaccess file of the domain and added these three lines:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2005
    Location
    New Jersey, USA
    Posts
    397

    Default

    You can also use the following

    RewriteEngine On
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^(.*) https://yourdomainhere/ [R]

Similar Threads & Tags
Similar threads

  1. "ssl_error_rx_record_too_long" when accessing https: site
    By harsonrobkus in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-01-2010, 05:00 AM
  2. HELP: Installed SSL Cert, but https:// "page not found"
    By jpfour23 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-20-2004, 12:04 PM
  3. Error " Protocol scheme 'https' is not supported"
    By anish sidhan in forum Themes and Branding
    Replies: 0
    Last Post: 12-02-2003, 08:24 AM
  4. In webmail how do you change the "Click here for secure site link"
    By napalm1 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-21-2003, 02:50 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube