Redirect All Unsecured Traffic to HTTPS – 2 Methods


You should set to redirect all you website unsecured traffic to https.

HTTPS is a ranking factor in Google, it can make the difference in ranking positions between two equal sites.

Why https is important?

Why should you secure your website with SSL certificate?

  • Having SSL give trust to your site visitors that your website is secure
  • Https is also a ranking factor in search engines.

If traffic is coming from Http, eg http://www.example.com or http://example.com, then it is automatically redirected to https equivalent page.

Most hosting companies offer SSL certificates at no cost if you host your website with them.

How to configure SSL in WordPress website, 2 methods

1 Install a WordPress SSL plugin.

If you are not confident editing your .htaccess in your WordPress directory, installing a WordPress SSL plugin is the easiest method.

We recommend Really Simple SSL plugin which is easy to setup.

Go to you WordPress dashboard, click plugin and add new. Search SSL plugin. Install Really Simple SSL and activate the plugin.

The plugin will scan your WordPress site for SSL certificate, if it find one, you may activate the SSL, with that you are good to go.

Go to Settings › SSL to change any setting for your WordPress site.

If installing a WordPress plugin isn’t you cup of tea, there are 2 alternatives you can use to achieve the same result, continue to read on.

2 Permanent redirect (301) http to https by editing .htaccess file

Access your site’s files using a File Transfer Protocol (FTP) tool such as FileZilla or using File Manager in Cpanel. Adding redirect rules in you .htaccess file will force visitors to view your page with https, even if they do not specify it,

.htaccess is a configuration file that modifies how a website works in the directory the .htaccess file is in.

The following code will force visitors to view your site with https. Make sure to replace example.com with your actual URL.

# Always use https for secure connections
# Replace 'www.example.com' with your domain name
# (as it appears on your SSL certificate)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]

How to edit your .htaccess file

Log in to Cpanel, click on File Manager.

If .htaccess file is hidden, click setting on upper right corner, make sure the Show Hidden Files are checked

Right-click on the .htaccess file and click Edit from the menu. paste the codes needed for Redirects and Rewrites above.

Click Save Changes in the upper right corner when done. Create new .htaccess file if you don’t have it in the folder.

Sponsored: Don’t miss: .COM for just $0.98! from Namecheap

Share your thoughts in the comments below!


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *