Skip to content

Secure Website Certificate (Beginners Guide)

Spread the love

The internet is a world like ours where there are people with good intentions and others with bad intentions. To protect well-intentioned people the state sets up security organizations. It’s exactly the same principle on the internet.

What Is An SSL Certificate?

The SSL certificate or electronic certificate or digital certificate is the equivalent of a digital identity card that protects your site on the Internet against malware. It takes the form of a file linking the information of a cryptographic key to the information of a natural or legal person.

Benefits Of SSL Certificate

  • Allows secure data exchange by encryption
  • Allows visitors to identify you as the owner and to be sure of the existence of your company on the date of installation of the SSL certificate.
  • Allows you to switch from HTTP to HTTPS.

SSL certificates are of many types and offered by several organizations. The SSL installed on NameCheap is AutoSSL type and is offered to you by Cpanel, Inc.

If you are facing any difficulties installing your SSL certificate, do not hesitate to leave a comment below.


Here, we are going to show you a trick allowing you to redirect your site in HTTPS but first, we will give you some advantages of HTTPS.

Advantages Of Https

  • Allows secure data exchanges by encryption
  • Allows visitors to identify you as the owner and to be sure of the existence of your company on the date of installation of the SSL certificate.

What Is The .Htaccess File?

The htaccess is an apache configuration file used to indicate commands to the server. It can be used for example to protect a page with a password or to create error pages when a user clicks on any link (401, 403, 404 errors, etc.)

This file placed in the directory acts on this directory and on all the other sub-directories; You can also put this file in a subdirectory but it will not act on the parent directory.

The method of redirecting from http to https varies depending on the technology used to develop your site or platform.

If you use a CMS such as WordPress, read on.

But if it’s a homemade site, create your .htaccess file, place it at the root of your site, and paste the following piece of code:

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

Warning: If you have several additional domains in your public_html, the redirect will cause a problem, it will redirect all the traffic in HTTPS.

This code will allow you to redirect, while specifying the domain.

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

Switch WordPress To HTTPS

We have seen that to migrate your website from HTTP to HTTPS you would necessarily have to have an SSL Certificate (this one being included in your hosting package if you are hosting on NameCheap), and then change the permalinks of your site from HTTP to HTTPS.

When you install your site, all its URLs take from the default URL which is the installation URL. Therefore all links (images, themes, CSS, JS, etc.) will take from the installation URL. At the end of this operation, your site should therefore go from to including all its other links.

Log in to your admin panel and go to the settings> general sectionChange the address of your site and that of WordPress to HTTPS and make sure that they are indeed identical. Once this operation is complete, a permanent 301 redirect will be added via the HTACCESS file. For that, you will add the code below in your .htaccess file and place it under the root of your site.

RewriteEngine on
RewriteCond% {HTTP_HOST} ^ [NC, OR]
RewriteCond% {HTTP_HOST} ^ [NC]
(*). RewriteRule ^ $ https: //$1 [L, R = 301, NC]

Then search your site for all the URLs starting with HTTP… and change them to HTTPS. In the end, all the links on your site must have turned to HTTPS. 

There exist many plugins allowing you to redirect your site from HTTP to HTTPS but we will refrain from listing them here.

That’s It!

Once the procedure we described above is complete make sure you have:
– Redirect in HTTPS (301) via .htaccess
– Change all the URLs in your database to HTTPS
– Declare your site in HTTPS to Google Search and send a sitemaps
– Test your site in HTTPS:

Newsletter SubscriptionYou don't wanna miss our exclusive guides

Get Exclusive Online Business Guides and Tips That I Only Share With Email Subscribers

Spread the love

Leave a Reply