To ensure all visitors access your website securely, you can configure your server to automatically redirect traffic from HTTP (http://) to HTTPS (https://). This guarantees encrypted communication and prevents browsers from showing “Not Secure” warnings.

 

Why Redirect to SSL?

  • Protects sensitive data (logins, payments, personal info).

  • Ensures visitors always use a secure connection.

  • Improves SEO rankings (Google favors HTTPS).

  • Prevents mixed‑content warnings in browsers.

 

Redirecting via .htaccess (Apache/LiteSpeed Servers)

  1. Confirm that your domain has a valid SSL certificate installed.

  2. In your site’s root directory, locate or create a .htaccess file.

  3. Add the following lines:

    apache
    
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  4. Save the file.  All HTTP requests will now redirect to HTTPS.

 

Redirecting via WHM/cPanel

  • WordPress Sites → Enforce SSL directly from the WordPress admin dashboard under Settings → General → Site URL.

  • cPanel Domains → Use Domains → Force HTTPS Redirect to enable automatic redirection for each domain.

  • WHM → Administrators can enforce SSL globally by editing Apache configuration or enabling HTTPS redirects at the account level.

Notes

  • Always ensure your SSL certificate is valid before enabling redirects.

  • Redirects can be applied globally or per directory depending on your .htaccess placement.

  • Test your site after enabling redirects to confirm proper functionality.

War diese Antwort hilfreich? 0 Benutzer fanden dies hilfreich (0 Stimmen)

Powered by WHMCompleteSolution