Present days, SSL is important for every type of websites. It helps to make your website secure and earn the trust of your website’s visitors. Besides this, SSL certificate and HTTPS boosts your website ranking on various search engines. So, if you don’t have already added SSL to your website, it’s time to move from HTTP to HTTPS.
Are you want to move from HTTP to HTTPS and install an SSL certificate in WordPress site? This step-by-step guide will make it easier to add SSL to website. In this tutorial, we will show you how to add SSL and HTTPS in WordPress.
You can buy an SSL certificate for only $9/year at Namecheap.
Are you want to move from HTTP to HTTPS and install an SSL certificate in WordPress site? This step-by-step guide will make it easier to add SSL to website. In this tutorial, we will show you how to add SSL and HTTPS in WordPress.
What are SSL and HTTPS?
SSL (Secure Sockets Layer) creates an encrypted layer when data passed between two systems. Whether it is server to server or server to browser communication, SSL encrypts the data to make it secure. SSL and HTTPS both are used to protect the online data by creating a secure connection between browser and server.- SSL – Transport Layer Security protocol that provides communications security over a network.
- HTTPS – HTTP over Transport Layer Security protocol that provides secure communication over a network.
Add SSL and HTTPS in WordPress
It’s very easy to add SSL and implement HTTPS redirection in WordPress. Follow the below step-by-step guide to install SSL and configure WordPress to enable SSL and HTTPS to your website.Choose and Buy Suitable SSL Certificate
There are three commonly used SSL certificate types are available.- Domain Validation (DV): This certificate verifies the owner of the domain.
- Organization Validation (OV): This certificate verifies the owner of the domain and organization.
- Extended Validation (EV): This certificate provides the highest level of security with strict verification of the organization.
You can buy an SSL certificate for only $9/year at Namecheap.
Install SSL Certificate
Once you have done CSR (Certificate Signing Request) and purchased an SSL Certificate, your SSL Certificate will be signed and issued. Now you need to download SSL Certificate and install it on the hosting server. Otherwise, you can ask your web hosting provider to install it on your server.Setup WordPress to Use SSL and HTTPS
Once you have SSL certificate installed on your server, now you need to configure the WordPress for using SSL Certificate. Configure the following settings to add SSL and HTTPS in WordPress.- Update WordPress URL to HTTPS:
Login to your WordPress admin panel and navigate to Settings » General. Change the WordPress Address and Site Address, and addhttps://www.
instead ofhttp://
in the beginning.
If you are implementing SSL in your existing site, you need to setup SSL redirect. Use HTACCESS file to setup SSL redirect from HTTP to HTTPS in WordPress.
Add the following code in the root’s .htaccess file to redirect HTTP URL to HTTPS with www.
Don’t forget to replace
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
</IfModule>example.com
with your site domain name. - Force SSL for Admin and Content:
Add the following code above the “That’s all, stop editing! Happy blogging.” line in thewp-config.php
file.
define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_CONTENT', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'):
$_SERVER['HTTPS']='on';
endif; - Change All Links to HTTPS:
If you’re adding SSL to your existing WordPress site, make sure all the links are modified with HTTPS. Otherwise, many browsers (Google Chrome, Firefox, etc.) may show the Not Secure and Mixed Content warning. It can be done by replacing all links from http to https in the database.
Comments