- Step 1 - Go to File Manager in the control panel
- Step 2 - Create an .htaccess file
- Step 3 - Edit the .htaccess file
- Step 4 - Paste in the code
- Step 5 - Done!
SSL is enabled by default on all domains hosted with One.com. This means that both HTTP and HTTPS will work for your site. If you want to make sure that your visitors always use HTTPS, then you can automatically redirect HTTP to HTTPS. In this guide we show you how to do this.
Step 1 - Go to File Manager in the control panel
- Log into the One.com control panel.
- Open File Manager.
Step 2 - Create an .htaccess file
- Click the arrow at the right of the blue button and select New other file.
- Name the file .htaccess, beginning with a dot.
Note: If you already have an existing .htaccess file on your web space, you don't need to create a new file. Instead you can edit the existing file.
Step 3 - Edit the .htaccess file
Select the .htaccess file and click Edit at the top of your screen to open the text editor.
Step 4 - Paste in the code
Paste the following code in the text editor, and click Save at the top of your screen.
#Rewrite everything to https
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Step 5 - Done!
All done! Open your site in your browser and check if you see the green secure lock.
Related articles: