Redirect HTTP to HTTPS Redirect HTTP to HTTPS

How to Redirect HTTP to HTTPS Automatically Using cPanel

When you buy a new domain, ensuring that your website is secure is a top priority. One common issue that new domain owners encounter is that their site shows up as “Not Secure” when visited with “http://yourdomain.com” but appears secure with “https://yourdomain.com.”

This means that your site isn’t automatically redirecting HTTP traffic to HTTPS. In this post, we’ll walk you through the steps to fix this using cPanel.

Why HTTPS Matters

Before diving into the steps, let’s briefly discuss why HTTPS is important. HTTPS (Hypertext Transfer Protocol Secure) encrypts the data exchanged between your website and its visitors, providing a secure connection.

This not only protects sensitive information but also helps build trust with your audience. Additionally, search engines like Google prioritize HTTPS sites, potentially boosting your SEO.

Step-by-Step Guide to Enable HTTPS Redirection

Step 1: Enable HTTPS Redirection via .htaccess

  1. Log in to Your cPanel Account
    Open your web browser and navigate to the URL for your cPanel login. Enter your username and password to access the dashboard.
  2. Access the File Manager
    In the cPanel dashboard, locate the “File Manager” icon under the “Files” section and click on it.
  3. Locate the .htaccess File
    Navigate to your website’s root directory, usually named public_html. Look for a file named .htaccess. If it doesn’t exist, you’ll need to create it. Right-click in the public_html directory, select “New File,” and name it .htaccess.
  4. Edit the .htaccess File
    Right-click on the .htaccess file and select “Edit.” Add the following lines of code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

This code tells the server to redirect all HTTP requests to HTTPS, ensuring all traffic to your site is secure. After adding the code, save your changes.

Step 2: Use cPanel’s Force HTTPS Redirect Feature

  1. Navigate to the Domains Section
    In the cPanel dashboard, find and click on the “Domains” icon.
  2. Enable Force HTTPS Redirect
    You will see a list of your domains. Find the domain you want to secure and look for an option like “Force HTTPS Redirect.” Toggle this option to enable it.

By following these steps, you ensure that all visitors to your website are automatically redirected to the secure HTTPS version, improving both security and user trust.

Conclusion

Securing your website with HTTPS is crucial for protecting your visitors and boosting your site’s credibility. By using cPanel to set up automatic HTTPS redirection, you take an important step toward a more secure online presence.

If you have any questions or need further assistance, don’t hesitate to reach out to our support team.

Leave a Reply

Your email address will not be published. Required fields are marked *