In this guide, we will show you how to ensure that your website is protected with a secure SSL connection. This not only guarantees the security of the information exchanged between the server and your visitors, but also improves the trust and credibility of your site. Setting up a secure connection is a simple but essential process that consists of several important steps.
Introduction to SSL certificates: their function and usefulness
We will start by checking whether you already have an SSL certificate installed and then guide you on how to force the secure connection through your site.
It is crucial to check whether you already have an SSL certificate installed on your hosting. This can easily be done from your control panel by following these steps:
Access the "Basic service list" and select the hosting you want to manage:
Go to the "Security" section and click on SSL Certificates:
When accessing this section, the SSL certificate status for that hosting will be displayed. If you have any subdomain/multidomain created in the hosting, it will appear in this list:
IMPORTANT: If your hosting does not appear with the certificate "Enabled", this process is managed internally by us. Customers cannot directly request the installation of the certificate. Our system is configured to automatically install the SSL once it detects that the domain points to our cdmon IP and there is hosting associated with that IP and domain. If you detect that the domain correctly points to our IP, but the SSL has not been installed, the automation may not have run correctly. In that case, we ask you to
contact us to resolve the issue.
Once you have confirmed that the SSL certificate is active on the hosting, the next step is to ensure that your site always uses a secure connection. This can be achieved by modifying your website's .htaccess file.
Information and uses of the .htaccess file
This file is used to customize the configuration of directives and parameters defined in the main hosting configuration file. In other words, it allows website administrators to modify and control the web server configuration at directory level. This is especially useful because the server needs to read this file every time a request is made to the website.
To create a .htaccess file, you need to access the hosting via FTP. FTP is a service that allows you to access the files stored in the hosting, which lets you download files, upload new files, edit them, or, if necessary, delete them.
How to connect via FTP using webFTP.
If you already have a .htaccess file inside your hosting, you can use it to perform this configuration.
Once you access your webFTP, you must enter your /web folder and create a "New file" called .htaccess. If you prefer, you can use the "Upload file" option, which will allow you to use a file from your device. You can create a .htaccess file and upload it directly:
The content to add inside the .htaccess file is the following:
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
This code is universal and should work for any type of website.
Once you have entered the code, save the changes and make sure the .htaccess file has been created inside the /web folder as indicated initially.
With this change, you are forcing the secure connection for the entire hosting, thus ensuring that all communications between your visitors' browser and your website are carried out through an encrypted SSL connection. This measure not only improves your site's security, but also contributes positively to your website's ranking in search engines, since Google and other search engines prioritize sites that use HTTPS over those that do not.
Once the change has been implemented, it is important to verify that the redirect works correctly. You can do this by accessing your website using HTTP and checking whether it automatically redirects to HTTPS.
Specific Configurations for CMS
It is important to mention that many websites use content management systems (CMS) such as WordPress, PrestaShop, Joomla or Moodle. Each of these may have its own default configuration to enable HTTPS redirection.
For detailed instructions on how to configure SSL in these CMS, as well as perform the redirect through .htaccess, we invite you to consult our guide "How to configure your SSL". This guide includes screenshots and specific steps for each CMS.