Knowledgebase

How do I enable https on my website?

Encryption with https is intended to provide benefits like confidentiality, integrity and identity. Your information remains confidential from prying eyes because only your browser and the server can decrypt the traffic. Integrity protects the data from being modified without your knowledge.

All domains on Surftown PHP webhotels come preloaded with Let’s Encrypt encryption, so all you need to do in order to enable https on your website is to follow the guide below.

If your website is using Wordpress, please follow our Wordpress https guide here instead.

In the following example, I will be using the domain test-domain.nu


1. To begin with, navigate to your website in your browser, and manually write https:// in front of the domain name.

Address bar

If your domain is shown with a green padlock next to it in the browser at this point, you are ready to proceed and can skip to step 3

Secure

Secure


2. If you don’t see the green padlock, you can click the icon to see why this is. The cause is usually that one or more links or images on your site are specifically using http://. To fix this, you must go through your site and change any links and images that directly refer to http:// with https://

Insecure

Inecure


3. Open File Manager.


4. In File Manager, navigate to the domain folder. In my example, this is test-domain.nu.

Domain list


5. Click on the .htaccess file. If there is more than one file with that name, you need the one without an entry in the file type column, as shown in the image.

.htaccess

If you don’t see a .htaccess file, make sure File Manager is set to display hidden files.

If you still don’t see a file, you can create one.


6. Click edit under View file details. This will open the file for editing in a pop-up window.

edit .htaccess


7. Insert the following code near the top of the file:

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

edit .htaccess

There are different forms of redirects you can use. R=301 in the code above signifies that this redirect is permanent, while R=302 would signify that it is temporary. This makes a difference when it comes to your page’s search ranking. If you move a page through a 301 redirect, and later remove the redirect again, your page will lose its search ranking at Google.

For this reason, we recommend that you use a 302 redirect while testing your changes, and only replace that with a 301 redirect once you are sure it won't cause problems.

Now save the file. With this, you should be done, and your page will be displayed with a green lock in the address bar for all visitors.

padlock


If you would like Surftown to perform this task for you, or if you are in need of any other assistance, please have a look at the paid services we kan offer through our Service Desk Services: https://www.surftown.com/da/service-desk/

Contact
Should you not find what you are looking for then feel free to ask our support

Create A Ticket
Service Desk
Are you facing bigger challenges which requires a bit more know-how and time than you have?

Surftown Service Desk is services where we do the work to you. Our Service desk will get the job done.

Do it for me