{"@context":"http://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://support.wpagency.io/how-to-add-ssl/"},"headline":"How to Add SSL","datePublished":"2020-08-05T23:43","dateModified":"2020-08-05T23:44","description":"To create an automatic redirection from http to https, please add the following code to your site’s Head-tag: <script language='JavaScript'> if(window.location.protocol != 'https:') { location.href…","author":{"@type":"Person","name":"Andrew Yang","url":"https://support.wpagency.io/authors/mansi-parekh/"},"publisher":{"@type":"Organization","name":"Andrew Yang"}}

How to Add SSL

To create an automatic redirection from http to https, please add the following code to your site’s Head-tag:

<script language="JavaScript"> if(window.location.protocol != 'https:') { location.href = location.href.replace("http://", "https://"); } </script>

How to add Code to Head of the Site:

In order to add a code to the head of your site, please click on 'Settings' -> then select 'Pro Settings' in the dropdown menu.

When 'Pro Settings' opens, insert the code into the "Site header code' text box and click 'Save'.​

That's it.