How to Set Up a Secure Website Using Cloudflare?

Google ADs

The majority of applications and services in today’s world are delivered via public networks or the internet via websites. Have you ever thought about the website you are accessing how come it is loading so fast, where it is hosted in the world? 

You are right, it might be hosted on a very powerful network, Cloudflare network global network. Websites hosted on Cloudflare global network are fast, reliable and secure. Cloudflare service provides a layer of protection between the Internet and your website. It acts as a traffic controller and optimizes how data will travel between your server hosting the website and end users.

Cloudflare provides a plethora of services for hosted websites giving end users a premium service experience such as website content is cached which helps to load websites faster, it filters malicious traffic to provide protection against malicious threats, SSL certificates, load balancing, website traffic insights etc. 

Google ADs

In this article we will learn about how to set up a secure website on Cloudflare global network.

Set Up a Secure Website Using Cloudflare

Using Cloudflare we can improve website performance and enhance end user experience. 

Step 1: Setup Cloudflare account

Visit link – Connect, protect, and build everywhere | Cloudflare and create / sign-up for free account 

Step 2: Add website

Click on ‘Add’ website

‘Add a site’ and provide your website domain name

Step 3: Choose a plan

Select plan which fits your need 

Step 4: DNS records review

Cloudflare scan and import existing DNS records to ensure all details are correct

Step 5: Update nameservers

New nameservers provided by Cloudflare. Login your domain registrar and change current nameservers with the ones provided by Cloudflare

Step 6: Waiting for propagation 

After 24 hours changes will be propagated and reflected globally  

Step 7: Optimize and verify 

Post nameservers are updated Cloudflare will send a confirmation mail. To verify all details and optimize Cloudflare settings login into the Cloudflare dashboard

DNS Settings Configuration in Cloudflare 

Step 1: Access DNS settings

Click on ‘DNS’ tab 

Step 2: Review existing DNS records

DNS records are imported by Cloudflare so check them to ensure they are correct

Step 3: Adding new DNS records

To add new DNS record, click on ‘Add record’ and create variety of records as per the requirement such as A record for mapping domain to IPv4 address, AAAA record for mapping domain to IPv6 address, CNAME is used for creation of alias name for another record, MX record is associated with email server of the domain

Step 4: Enable Cloudflare proxy

Cloudflare is proxying record for record is indicated with an orange cloud icon in dashboard

Step 5: Configure SSL/TLS 

In SSL/TLS select encryption mode ‘Flexible’ is good to start with . for more security choose ‘Full (Strict)’.

Step 6: Setup page rules

Customize Cloudflare behavior for selected URLs such as forcing HTTPS or establishing cache behavior.

Step 7: Enable automatic HTTPS rewrites 

All resources or links are served with HTTPS with this option

Step 8: Configure TLS version 

Minimum TLS version should be selected as 1.2 

Step 9: Enable HSTS (HTTP strict transport security) 

This is to tell browser to always use HTTPS for your domain for additional layer of security

Step 10: enabling authenticated origin pulls

To ensure request to origin server routed via Cloudflare only to ensure malicious traffic is scanned and restricted 

Step 11: Configure caching 

Content storage retention timelines are defined by setting up caching rules in Cloudflare

Step 12: Enable auto minify 

Automatic reduction of file size for HTML, CSS and JavaScript for faster loading of web pages 

Step 13: Activation of Brotli compression 

This is an advanced compression algorithm to make files smaller compared to traditional zip compression

Step 14: Cloudflare smart routing 

Optimization of path to which data is routed for faster delivery of website content 

Monitoring and analysis of website traffic is done from Cloudflare dashboard once the website setup is completed. You can get insights into website traffic, security related insights, performance metrics, content analysis, DNS queries and geographical data. 

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart