Step-by-Step Guide: Hostinger Cloudflare Settings
Step 1: Sign Up or Log In to Cloudflare
-
Create or log in to your Cloudflare account at Cloudflare.
-
Once logged in, click on “Add a Site” and enter your Hostinger domain (e.g.,
yourdomain.com
). -
Cloudflare will begin scanning your DNS records automatically.
Step 2: Choose the Cloudflare Plan
-
Cloudflare will show various plans. Select the Free Plan if you want to keep costs minimal. The Free Plan provides SSL, CDN, and security features.
-
Click “Confirm Plan” to proceed.
Step 3: Update DNS Records in Hostinger
Once Cloudflare scans your domain, it will provide nameservers that need to be updated in your Hostinger account.
-
Log in to your Hostinger account and open hPanel.
-
Navigate to Domains, then select your domain.
-
Look for the DNS / Nameservers section and select Use Custom Nameservers.
-
Enter the nameservers provided by Cloudflare (e.g.,
ns1.cloudflare.com
andns2.cloudflare.com
). -
Save the changes. DNS propagation may take 24-48 hours to fully take effect.
Step 4: Configure Cloudflare SSL/TLS Settings
Cloudflare offers different SSL modes that determine how the connection between your website and visitors is encrypted. To ensure a secure connection, follow these steps:
-
Log in to your Cloudflare dashboard.
-
Navigate to the SSL/TLS tab.
-
Select the Full (Strict) SSL mode to ensure both Cloudflare and your web server use valid SSL certificates:
-
Full SSL: Encrypts traffic between Cloudflare and your server but doesn’t require a valid SSL certificate on your server.
-
Full (Strict) SSL: Ensures full end-to-end encryption, requiring a valid SSL certificate on your server. This is recommended for the best security.
-
-
Enable Always Use HTTPS to ensure your visitors are redirected to the HTTPS version of your site.
-
Enable Automatic HTTPS Rewrites to automatically fix any mixed content issues.
Step 5: Optimize Cloudflare Caching Settings
Cloudflare’s Content Delivery Network (CDN) will cache your site’s content on servers worldwide, improving load times and reducing server load. You can fine-tune caching and content delivery with the following steps:
-
Go to the “Caching” tab in Cloudflare’s dashboard.
-
Set the Cache Level to Cache Everything if you want to cache all types of content, or leave it on Standard for dynamic content.
-
Enable Always Online to serve a cached version of your site if your server goes down (this is a Cloudflare feature that keeps your site accessible even when it’s temporarily unavailable).
-
Set Edge Cache TTL to control how long Cloudflare’s edge servers store your cached content. You can adjust this based on your website’s update frequency.
Step 6: Enable Security Features in Cloudflare
Cloudflare provides several security features to protect your website from attacks:
-
Firewall Settings:
-
Enable Firewall Rules to block or challenge malicious requests.
-
You can create specific rules for blocking known bad IPs, regions, or user-agents.
-
Cloudflare’s Web Application Firewall (WAF) helps prevent attacks like SQL injections, cross-site scripting (XSS), and more.
-
-
Bot Fight Mode:
-
Enable Bot Fight Mode to automatically block harmful bots from accessing your site.
-
-
DDoS Protection:
-
Cloudflare automatically protects against large-scale DDoS attacks as part of their free plan.
-
However, you can enable additional settings like Rate Limiting to prevent abuse from repeated requests.
-
-
Security Level:
-
Set the Security Level to Medium or High to block or challenge suspicious traffic, like bots or hackers.
-
Step 7: Monitor Website Performance and Security
Cloudflare provides real-time analytics on traffic, security events, and performance. Here’s how to monitor and adjust your settings:
-
Traffic Analytics: View data on traffic, threats, and attack events.
-
Performance Reports: Cloudflare will show you how caching is working and the performance of your website based on global traffic.
-
Security Analytics: Review security threats, bot traffic, and the actions taken by Cloudflare to protect your website.
Step 8: Verify SSL and HTTPS Setup
Once you have completed the Cloudflare and Hostinger configuration, it’s essential to verify that your website is using SSL and HTTPS:
-
Check the padlock icon in the browser’s address bar to ensure your site is secured with SSL (HTTPS).
-
Use SSL Labs’ SSL Test to verify the SSL configuration and ensure no issues with certificate validation.
-
GTMetrix or Pingdom can help you monitor the loading speed and performance improvements due to Cloudflare.
Additional Configuration Options
Cloudflare Page Rules: You can use Page Rules to customize Cloudflare’s behavior for specific URLs. For example, you can:
-
Cache static assets like images, JavaScript, and CSS.
-
Bypass Cloudflare caching for dynamic pages, like login or checkout pages.
Rocket Loader: Enable Rocket Loader to optimize JavaScript loading, which can enhance page load speeds by reducing the amount of time spent on rendering.
Conclusion: Hostinger Cloudflare Settings
By correctly setting up Hostinger with Cloudflare, you’ll improve your website’s performance, security, and reliability. Cloudflare’s Free Plan provides robust features like SSL encryption, DDoS protection, and a global CDN to make your website faster and more secure. Ensuring proper configuration between Hostinger and Cloudflare will lead to a smoother experience for both you and your visitors.