Knowledgebase

How do I enable https on my WordPress 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 WordPress is to follow the guide below.

1. Login to your WordPress installation.

WP Admin


2. Navigate to Settings -> General.

Settings -> General


3. In the fields WordPress Address (URL) and Site Address (URL), change http to https then Save Changes. Depending on your configuration, the paths in the two fields may be the same or they may be different. This is normal. You will still only have to replace http with https in both fields.

Address (URL)

Save Changes


4. Open File Manager.


5. In File Manager, navigate to the folder that corresponds to the path in the Site Address (URL) field from before. In my example, this is test-domain.nu

Domain list


6. 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.


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

edit .htaccess


8. 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

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

padlock


If your site contains image links where the path has been set using the http:// prefix, you may get mixed content warnings from the browser when visiting those pages.

You must manually edit these links to replace http:// with https://.


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 can 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