Search

Language:  
Search for:

Available article translations:

How do I force all visitors of my website to use secure connection (HTTPS)? (Linux)

Article ID: 112135, created on Aug 30, 2011, last review on Feb 21, 2015

APPLIES TO:
  • Parallels Plesk for Linux/Unix

Question

How do I force all visitors of my website to use secure connection (HTTPS)?

Answer

  1. Make sure that mod_rewrite Apache module is enabled:

    # httpd -t -D DUMP_MODULES | grep rewrite
    Syntax OK
     rewrite_module (shared)
    
  2. Create file .htaccess in document root of the domain and put following configuration inside:

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{HTTPS} !=on
        RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,QSA]
    </IfModule>
    

Search words:

force https

force secure connection

ssl




c81e59b61af9dca603ba03b14aabe968 9f8baf78266b4e54525d1c6bf06305a5 56797cefb1efc9130f7c48a7d1db0f0c

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification