Nowadays we should use SSL even on websites without any shop or forms. Google doesn’t like pages without SSL. We can enable this protocol in WordPress – it’s a quite easy process.

Enable SSL

Go to Settings -> General and enter your website URL address with https in these two fields.

Now you have SSL enabled on your website. We should now avoid events when the user can access your website using and Add this code to your .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R,L]

Of course, you need to change to your domain name. Now you will be automatically redirected to SSL even if you enter URL with http.

Force SSL on the backend

I recommend forcing SSL on the backend. You can do that by adding code to wp-config.php file:

define('FORCE_SSL_ADMIN', true);

just before this line:

/* That's all, stop editing! Happy blogging. */

That’s it. Have fun 🙂

Share this post

Leave a Reply

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