- 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 configuration
- 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 in to the one.com control panel.
- Click File Manager on the Files & Security tile.
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 configuration
Paste the following configuration 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 click on the security lock to confirm the connection is secure.
Related articles: