How to Force HTTPS for Your Website? Print

  • 0

How to Force HTTPS for Your Website

Method 1: Using the NixZoeHost Dashboard (Recommended)

This is the simplest method and works for almost all websites hosted on our servers.

  1. Log in to your NixZoeHost Dashboard and enter your cPanel.

  2. Navigate to the Domains section and click on Domains.

  3. Locate the domain you want to secure.

  4. Toggle the Force HTTPS Redirect switch to ON.

[Image: cPanel Domains interface showing the "Force HTTPS Redirect" toggle switch]


Method 2: Using the .htaccess File (Advanced)

If Method 1 is unavailable or you prefer a manual configuration, you can add a rule to your sites .htaccess file.

  1. In cPanel, open the File Manager.

  2. Navigate to your sites root folder (usually public_html).

  3. Right-click the .htaccess file and select Edit. (If you don't see it, click "Settings" in the top right and check "Show Hidden Files").

  4. Paste the following code at the very top of the file:

Apache
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  1. Click Save Changes.


Method 3: For WordPress Users

If your website is built on WordPress, you should also update your internal settings to prevent "redirect loops."

  1. Log in to your WordPress Admin Dashboard.

  2. Go to Settings > General.

  3. Change both the WordPress Address (URL) and Site Address (URL) from http://yourdomain.com to https://yourdomain.com.

  4. Scroll down and click Save Changes.

Note: You may be logged out of WordPress after this change; simply log back in using your usual credentials.


Why should you force HTTPS?

  • Encryption: Protects the data sent between your server and the visitor.

  • Trust: Removes the "Not Secure" warning in Chrome and Safari.

  • SEO Boost: Google gives a slight ranking advantage to websites that use HTTPS.

  • Browser Features: Modern features like Geolocation and push notifications require a secure connection to function.

Troubleshooting

  • Redirect Loops: If your site says "Too many redirects," ensure you don't have conflicting rules in your .htaccess file and that Method 1 is not fighting with a WordPress plugin.

  • Mixed Content: If the padlock is missing even on HTTPS, some images or scripts are still being loaded via http. You can fix this using a plugin like "Really Simple SSL" or by updating your links manually.


Was this answer helpful?

« Back