What is Cloudflare and How To Set It Up For Your Site?

Cloudflare is a Content Delivery Network (CDN), but it’s also a firewall and a performance layer for websites. It offers a multitude of features and enhancements (available at extra cost) and developers think it’s great, so let’s explore what they like so much about this service.

Asset caching

Caching your non-dynamic assets after they’ve first been requested will reduce the load on your server, one of the benefits that Cloudflare brings. It will also help to cut the amount of bandwidth being eaten up. This is a big deal because without Cloudflare, for every image on a page that’s requested by a user their browser needs to make an extra request, so if there are lots of assets on the page, that will soon add up, and add strain to the server. At one MB per image, a page with a dozen photos will be burdening it with an additional 12 megabytes of finding, processing, and serving, and, if you multiply that by everyone else who is accessing the site it’s easy to see how your resources can become tied up, which slows the experience down for everyone.

Cloudflare’s Asset Caching is a neat way of getting around this problem. When an image has been served for the first time, a copy is placed on its servers (meaning the asset is cached). The idea is that all subsequent requests will then be met by Cloudflare servers rather than your local server. This eases the burden tremendously, so your machine is free to get on with keeping your website running at optimum speed.

Here is a screen capture from the Cloudflare account of a client of ours, showing some stats from this week just gone – that’s a 90% caching rate.

To ease the burden on your server even more you can also apply this process to static pages. It’s particularly well suited to pages with dynamic content or contact forms.

Worldwide CDN

In addition to asset caching, Cloudflare’s global Content Delivery Network replicates the process in excess of 200 world cities. This makes for much faster page loading times no matter where the person requesting the pages in the world because the network will always choose the server that’s closest to them. A typical user has reported a Worldwide average loading time for their home page that dropped from just over one second to just over one-third of a second.

DDOS and Firewall Protection

Cloudflare also offers protection from cybercrime activity such as brute-force attacks. As it covers more than 12 million sites it’s ideally placed to identify users and bots with malicious intentions. This experience gives it a distinct dynamic advantage over your local security.

In the event of suspicious activity, it can generate a verification challenge to make sure that the user is genuine. The protection available is constantly evolving to match the tide of constantly evolving threats, Which means that your security is always up to date.

Your Cloudflare and Domain logins Stay With You   

When you use Cloudflare you can share your account with us without letting us know your login information. This is an approach that a lot of companies are taking now. Create the account in your own name using your e-mail address and we will be able to access it. You won’t need to share a password and you can remove our access privileges at any time.

Great DNS management

Nerds will be pleased to know that Cloudflare offers great DNS management using an API. DNS records are a bit like the post office. They can tell your browser where to find a website. You type in the name, and the DNS records turn it into the exact location. This isn’t something that typically affects your normal operations, but the ability to update your records easily can be a real time-saver if you ever need to switch servers or include verification records (as Google Search Console insists upon).

Cutting-edge features

Everything we’ve described so far is included with a free Cloudflare account. Upgrading to pro or business accounts gives you access to even more useful tools and features. These include:

  • Image optimization – if the user’s browser supports a particular modern format, this feature uses it to serve them, because smaller images load much more quickly.
  • Better delivery – enabling HTTP/2 makes web pages load more quickly and serves them in the most efficient order
  • Additional page rules – these let you do caching, redirecting, or any one of a number of other things to pages and URLs before the user gets anywhere near your server. The free account gives you three, and with upgrading the number increases.
  • improved security – the Pro offering and above gives you better firewall protection.

If you have mission-critical projects then you probably want to take a look at the pricing page, which recommends using the Pro version as a minimum, to be on the safe side.

Cloudflare workers

You don’t get Cloudflare workers with the regular service, but you do if you use it for your DNS. They let you run your own applications on Cloudflare’s servers or alter intercept requests for an image or page to make it do more. 

We used Cloudflare workers to shut the door on an extra request to one of our client’s servers. As of this writing, our Cloudflare usage has reduced the load on their server considerably, by an amazing three and a half million requests, just in the last seven days.

How to Set Up  for Your Domain in Cloudflare Account

How can you activate Cloudflare for your domain name? You have two options to choose from:

Option 1:

Using a CNAME record for www.mydomain.com — you can access CNAME setup for both the Enterprise and Business Cloudflare packages.

Option 2:

Directing a domain name to Cloudflare nameservers after you create a Cloudflare account, though you’ll need to take extra steps to ensure your domain functions properly. We’ll cover those steps below.

After you sign up for your Cloudflare account, the software will redirect you to set up your initial domain name. Enter the domain name you want to enable Cloudflare for, then tap the ‘Add Site’ button.

Pick a Plan

Then, you will move to the next page in the process, on which you will pick your preferred plan. The Free package is available as default — if you want to start with this, click on it then press the ‘confirm plan’ button.

You might choose to sign up for a paid Cloudflare plan at a later date if you’re impressed and want to take advantage of additional features. Check out https://www.cloudflare.com/plans/ if you would like to compare and contrast the different plans.

Check Your DNS Records

The next stage includes a list of your current host records. Make sure you check that the DNS records specified align with those in your Plesk or domain registrar dashboard before you proceed. However, we recommend that you DO NOT modify your DNS records at this point in the process — you will be able to do this later once you finish the setup. Scroll down then tap ‘continue’ if all records listed are right.

Switch Nameservers

During the next step you need to change your existing nameservers to your Cloudflare ones instead. For this purpose you should modify the nameservers of the domain on the level of your domain registrar.

When you have finished configuring your nameservers, you may need to wait one or two days for local ISPs to adjust their DNS caches and allow users to view your site. As caching time differs from one ISP to another, you will need to allow time for the entire DNS change to be completed.

After you set up your nameservers, go back to the Cloudflare tab then press the ‘check nameservers’ button. If you’re satisfied that the nameservers have been updated correctly, the ‘active’ status will be displayed.

Configure DNS Records

Next, you can go to the DNS menu to set up DNS records and conduct any DNS change you need to. You can add or remove your domain’s DNS records on the DNS Records page. Click on the ‘add record’ button if you want to add a record, then pick the relevant record type, the hostname (for the domain itself or the subdomains), and the value of the record. However, the TTL will be automatically set up. Press the ‘save’ button when you’re sure the record is ready. 

You can activate or deactivate the Cloudflare service for every record easily. Just press the gray/orange cloud icon below the ‘proxy status’ column.

Please be aware: All of your domain’s DNS records in Plesk will become inactive once the nameservers change. That’s why you need to ensure that they have been properly configured in your Cloudflare account, and the new DNS records should be made in the Cloudflare account too. For example, if you want to update your domain’s IP address or change to a different mail service, update the MX and A records appropriately. 

 

One comment

  1. Thanks for the detailed article. I was considering to go for CDN, but was apprehensive to change the DNS settings. Now I will opt for Cloudflare CDN !

Add a Comment

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

We are Plesk

Value simplicity and automation too? We help devs, sysadmins, and resellers run, manage and secure via our control panel solutions, extensions and hyperscale opportunites. Discover how you fit with us.

GET LATEST NEWS AND TIPS

  • Yes, please, I agree to receiving my personal Plesk Newsletter! Plesk International GmbH and other WebPros group companies may store and process the data I provide for the purpose of delivering the newsletter according to the Plesk Privacy Policy. In order to tailor its offerings to me, Plesk may further use additional information like usage and behavior data (Profiling). I can unsubscribe from the newsletter at any time by sending an email to [email protected] or use the unsubscribe link in any of the newsletters.

Related Posts

Knowledge Base

Plesk uses LiveChat system (3rd party).

By proceeding below, I hereby agree to use LiveChat as an external third party technology. This may involve a transfer of my personal data (e.g. IP Address) to third parties in- or outside of Europe. For more information, please see our Privacy Policy.

Search
Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt