Steps to set up Redirection of HTTP to HTTPS in WordPress

Tutorials

HTTPS signifies hypertext transfer transfer protocol secure which helps to protect the integrity and confidentiality of transmitted data between a visitor's browser and a website.

Here at Fixwebnode, as part of our Website Development Services, we regularly help our customers to update and redesign their websites.

In this context, we shall look into the different methods of implementing redirection from HTTP to HTTPS.

 

Reasons why you should have your website in HTTPS?

Most WordPress website owners prefer their site to be in HTTPS due to a number of reasons as outlined below;
i. The ranking of a website  in recent times on Google search slightly depends on the availability of the website in HTTPS. This means that a website using HTTPS tends to rank higher than one with just HTTP.

ii. Sites using HTTPS enjoys better performance as they support HTTP/2 protocol prompting browser to work with HTTPS.

iii. With HTTPS, security is more secured and the visitor's data is encrypted.

iv. With HTTPS, trust is built by enabling a green or grey padlock in the visitor's browser address bar.

How to perform Redirection from HTTP to HTTPS for a WordPress site?

WordPress sites have quite a number of methods of implementing redirection from HTTP to HTTPS.
Most Website Host have a an option to force HTTP with a special tool once your have a valid SSL Certificate for your WordPress website hosted with them.
Alternatively, this can be implemented via the web server configuration file (Apache and Nginx) or conveniently with a free WordPress plugin.
It is important to note that while setting the redirect from HTTP to HTTPS, you should include a 301 redirect directive to make the Website compliant for SEO purposes. Utilizing a different redirect can affect the ranking of your website in a negative way.
Next, we will look into how to configure HTTP to HTTPS redirection in both NGINX and APACHE web server.

How to Redirect HTTP to HTTPS in Nginx?

Nginx is one of the most popular web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache.
It enhances website performance by accelerating content and application delivery, improving security, facilitating availability and scalability for web sites having a massive amount of traffic and visitors on the Internet.
If your website is being served by Nginx web server, setting up redirection from HTTP to HTTPS is very easy to implement. It involves adding a few lines of codes to Nginx configuration file.
It looks like this;
server {

listen 80;
server_name website.com www.website.com;
return 301 https://website.com$request_uri;
}

 

How to Redirect HTTP to HTTPS in Apache?

Apache HTTP Server is the most popular free and open-source web server for delivering web contents via the internet.
Implementing redirection of all the HTTP traffic for a website running APACHE web server can be easily configure via a .htaccess file. With a few lines on code in this file, you can easily configure redirection of http to https which will look like this;
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

How to Redirect HTTP to HTTPS using Really Simple SSL Plugin?

Another option to implement redirection from HTTP to HTTPS is via a WordPress plugin such as Really Simple SSL .
This plugin is developed by Rogier Lankhorst and is very popular having over 2+ million active installs with a rating of 4.9 out of 5-star.
Once you install the plugin, you simply activate by clicking on "Go ahead, activate SSL" to start using it.

Need to Optimize your WordPress Website? We are available to help you today.

 


Conclusion

Steps to redirect from HTTP to HTTPS. How to configure Apache, Nginx we server to redirect from HTTP to HTTPS or by using Really Simple SSL WordPress Plugin.

Your Cart