How to set up CloudFlare for your website
14:58, 11.09.2017
Benefits of Implementing Cloudflare for Your Website
- Enhanced Security: Cloudflare provides robust protection against DDoS attacks, malicious bots, and other online threats, ensuring your website stays secure and operational.
- Improved Performance: By caching content and using a global CDN, Cloudflare reduces latency and improves load times for users around the world.
- Reliability: With its network of data centers, Cloudflare ensures high availability and uptime, even during heavy traffic periods.
- Cost Savings: Cloudflare's services can reduce bandwidth costs by caching static content and mitigating traffic spikes.
- Advanced Analytics: Gain insights into traffic patterns, threats, and performance metrics with Cloudflare's detailed analytics.
- Easy SSL Management: Simplify the implementation and management of SSL certificates to enhance security and transparency.
- SEO Benefits: Faster loading times and enhanced security can improve search engine rankings and user experience.
Necessary Preparations for Cloudflare Integration
To prepare for Cloudflare integration, make sure to access your domain name registrar before initializing the process.
Step 1: Create a Cloudflare Account
The first thing you need to do is to create a Cloudflare account.
Go to Cloudflare, and create a new account via a Sign-Up form, which will take under a couple of minutes. Before going into the next step, verify your email address.
Step 2: Click "Add Site" to Begin
After you have logged in, you can add your domain name by clicking “Add Site”. Then you need to select a plan for your Cloudflare account.
You can also click on "Begin Scan" for Cloudflare to begin to scan all of your DNS entries and for you to get the results of the scan later.
Step 3: Review and Confirm Scanned Configurations
After you add your website, Cloudflare will automatically scan for DNS records associated with it. Sometimes, Cloudflare won’t be able to find all of your records in DNS, so it’ll ask if you can review your DNS records.
The first thing you need to do is to make sure that you set your search towards A records. As the search goes on, we recommend enabling Cloudflare for both the www and non-www versions of your website. At this stage, you can enable or disable specific subdomains by switching on or off their proxy status.
Once you are done reviewing scanned configurations, click “Continue” to proceed.
Step 4: Choose Your Cloudflare Plan
You can go with the free plan if you have small to medium websites. However, if you have a larger website, opting for a more feature-rich, paid plan might be a good idea.
Step 5: Update Your Domain's Nameservers
Nameservers are a part of Domain Name System (DNS), and help browsers to identify and match IP addresses and domain names. Cloudflare will guide you to change the domain’s nameservers, for which you need to copy them first. Next, go to your domain main registrar, where you will change your nameservers. The steps can be different based on which registrar you’re using, but at the core they have the same principles of action such as:
- Log into your hosting account and go to the “Domains” section.
- Go to the DNS/Nameservers section, and choose the “Change nameservers” option.
- Paste Cloudflare’s nameservers that you’ve copied and saves the changes.
Go back to the Cloudflare website, and check if the nameservers have updated. Keep in mind that it might take up to 24 hours for an update to be completed.
Step 6: Link Your Custom Domain to Your HostZealot Space
You can add your domain to your HostZealot space settings. Simply click the “Add” option and insert www.your_domain.com, and click “Save”.
Optimize Your Cloudflare Settings
You can optimize additional settings in Cloudflare such as HTTPS and HTTPS rewrites. We recommend always using HTTPS protocol and automating HTTPS rewrites.
Ensure Your Site Always Uses HTTPS
To redirect the site from “http” to “https”, turn on the "Always use HTTPS" option. This way, Cloudflare will respond to “http” requests with a redirect “https” URL. You can also customize this setting to select only several requests.
Enable Automatic HTTPS Rewrites
When you turn on the "Automatic HTTPS Rewrites" option, the specific HTTP links can be accessed through HTTPS automatically. You can figure out whether your site contains references to HTTP URLs if you see the lock icon is off or has a yellow triangle on it.