Step-by-Step Guide: Setting Up Cloudflare SSL on Hostinger
Step 1: Set Up Cloudflare Account and Add Your Site
-
Sign up or log in to your Cloudflare account at Cloudflare.
-
Once logged in, click “Add a Site” and enter your Hostinger domain (e.g.,
yourdomain.com
). -
Cloudflare will scan your existing DNS records. Once completed, click Continue to move forward.
-
Choose a Cloudflare plan (Free Plan works for most users) and confirm your selection.Step 2: Update DNS Settings in Hostinger
Cloudflare will provide you with two nameservers (e.g., ns1.cloudflare.com
and ns2.cloudflare.com
).
-
Log in to your Hostinger account and go to hPanel.
-
In the Domains section, click on your domain name.
-
Go to the DNS / Nameservers section and select Use Custom Nameservers.
-
Replace the existing nameservers with the Cloudflare nameservers.
-
Save the changes. It may take 24-48 hours for DNS propagation to complete.
Step 3: Enable SSL on Cloudflare
Once your domain is pointing to Cloudflare’s nameservers, proceed to set up SSL encryption.
-
Log in to your Cloudflare dashboard.
-
From the Cloudflare dashboard, click on the SSL/TLS tab.
SSL Mode Settings:
Cloudflare provides multiple SSL options. The most common and recommended option is Full (Strict) SSL.
-
Full (Strict): This setting ensures that both the connection between Cloudflare and the user’s browser and between Cloudflare and the Hostinger server are encrypted. This is the most secure option and is highly recommended.
-
Flexible: Encrypts traffic between the user’s browser and Cloudflare, but not between Cloudflare and the server (less secure).
-
Full: Encrypts traffic between both the user and Cloudflare and Cloudflare and your server, but does not validate the SSL certificate on the server.
Recommendation: Choose Full (Strict) to ensure maximum security.
Step 4: Enable “Always Use HTTPS” on Cloudflare
To ensure that visitors always use a secure connection (HTTPS) instead of HTTP:
-
In the SSL/TLS settings, navigate to the Edge Certificates section.
-
Enable the Always Use HTTPS option to automatically redirect all HTTP traffic to HTTPS.
Step 5: Install SSL on Hostinger (If Necessary)
Cloudflare provides SSL between the user and their network, but you also need to ensure SSL is set up on your Hostinger server for a fully secure connection.
-
Log in to your Hostinger account and open hPanel.
-
Go to SSL under the Advanced section.
-
Check if SSL is already installed for your domain. If not, you can install the Let’s Encrypt SSL certificate (free SSL).
-
Once SSL is installed on Hostinger, Cloudflare will use the secure connection for its full proxy service.
Step 6: Verify SSL Installation
To check if your SSL is working correctly:
-
Visit your website using yourdomain
-
Look for the padlock icon in the browser’s address bar, indicating that the SSL connection is active.
Step 7: Clear Cloudflare Cache
Once you’ve configured everything, it’s a good practice to clear the cache to make sure Cloudflare serves the most recent version of your website.
-
In your Cloudflare dashboard, go to the Caching section.
-
Click on Purge Everything to clear the cache.
Troubleshooting Tips
-
SSL Errors: If you encounter SSL errors, make sure that Cloudflare is set to Full (Strict) mode and that your Hostinger server has an active SSL certificate installed.
-
SSL Not Working: Double-check that the Cloudflare nameservers are correctly configured in your Hostinger account, and DNS propagation is complete.
-
Mixed Content Errors: If your site loads without SSL or shows mixed content warnings (some resources load over HTTP instead of HTTPS), enable Automatic HTTPS Rewrites in the Cloudflare dashboard under SSL/TLS > Edge Certificates.
Conclusion: Ensuring SSL Security for Your Hostinger Website
Setting up Cloudflare SSL on your Hostinger website ensures secure, encrypted connections for your visitors, improves SEO, and boosts overall website security. By following the steps above, you will have a fully protected site that benefits from Cloudflare’s robust security features.