If you are looking for how to redirect HTTP to HTTPS, then your search is over, below I have shared the best and the simplest way to do that.
So, Let’s get started.
How to Redirect HTTP to HTTPS in WordPress
Step 1: First, log into your cPanel and go to file manager.
Step 2: Then click on your domain name folder, and find the .htaccess file.
Note: If you didn’t find the .htaccess file. then it may be hidden, so just click on the settings button at the top right corner, and checkmark the show hidden files option, after that hit the save button, then you will be able to see the .htaccess file.
Step 3: Then right-click on the .htaccess file and click on the edit option, a pop-up will open, and again select the edit option.
Step 4: Now Add the below code, paste it into the .htaccess file, and click the save changes button.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
That’s all now your domain will automatically redirect all HTTP URLs to HTTPS.
So this was a quick guide on how you can redirect your HTTP URLs to HTTPS.