HTTP to HTTPS Redirect Checker

Check your website to see if it redirects from http to https.

What is HTTP to HTTPS Redirect Checker?

Use the HTTP to HTTPS Redirect Checker to double-check that your site is properly transferring users from the insecure HTTP version of a page to the safe HTTPS (SSL) version.

SSL is a protocol that encrypts communications between your website and your visitors, protecting sensitive information such as passwords and credit card numbers.

Google now uses the presence of HTTPS as a ranking indication, therefore it's important that it's enabled everywhere. Websites that do not employ security protocols to safeguard their users' and customers' sensitive information will be flagged as suspicious by search engines.

How to Redirect from HTTP to HTTPS?

The following is the simplest method for redirecting your website from HTTP to HTTPS.

Redirect HTTP to HTTPS on Apache

If mod rewrite isn't already activated on your system, you'll need to do so before proceeding with this procedure. Enter this command into the console to activate mod rewrite:

sudo a2enmod rewrite

Then restart apache2:

sudo service apache2 restart

Redirect http to https by inserting the following lines into an existing or newly created .htaccess file in the root directory of your website.

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

Redirect HTTP to HTTPS on Nginx

In order to change all of the traffic coming in from HTTP to the more secure HTTPS version, we need to make some changes to the Nginx configuration file.

This configuration file is often stored in the /etc/nginx/sites-available folder.

Add the following changes to the Nginx configuration file after you've found it.

server {
  listen 80 default_server;
  server_name _;
  return 301 https://$host$request_uri;
}

Redirect HTTP to HTTPS on cPanel

In the cPanel files manager, find the .htaccess file and add the following to it.

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