- What is Cloudflare and what does it do?Cloudflare is a company that runs a large global network.
- What does the free plan include?Authoritative DNS with a fast, global network.
- How does it fit with your host?Cloudflare does not replace your host.
What is Cloudflare and what does it do?
Cloudflare is a company that runs a large global network. For website owners the common setup is to point the domain’s nameservers at Cloudflare so that visitor traffic passes through it before reaching your host. In that position Cloudflare can answer DNS queries quickly, cache static files and some pages, encrypt traffic, filter malicious requests and hide the address of your origin server.
It is one of several providers of this kind. The ideas in this guide apply to any CDN or reverse proxy, though settings and names differ. Check the provider’s own documentation for current features and plan limits.
What does the free plan include?
- Authoritative DNS with a fast, global network.
- A CDN that caches static files.
- HTTPS between the visitor and the Cloudflare edge.
- Basic protection against common attacks and bots.
- Analytics, and simple rules for redirects and caching, within plan limits.
Paid plans add more rules, a stronger web application firewall, image optimisation and support. Limits and prices change, so check the current plan comparison before you decide.
How does it fit with your host?
Cloudflare does not replace your host. Your site files, database and email still live where they are. Cloudflare answers visitors from its network, and fetches from your origin when it has nothing cached. That is why you should keep a good host. It also means your origin should have a valid certificate and should accept requests from Cloudflare. See what a CDN is for the caching side, and what an SSL certificate is for HTTPS modes.
How do you set Cloudflare up?
Our nameservers guide explains the switch in more detail, including the DNSSEC step that is easy to forget.
- Add your domain
Cloudflare scans and imports your existing DNS records.
- Review every record
Check A, CNAME, MX and TXT entries against your list; see what DNS records are.
- Change the nameservers
At your registrar, replace the nameservers with the two Cloudflare gives you.
- Set the SSL mode
Use full or full (strict) once the origin has a valid certificate.
- Test the site
Check pages, forms, logins, checkout and email.
What are the benefits?
- Faster loading for distant visitors, because files come from a nearby location.
- Lower load and transfer on your host.
- Protection from many automated attacks; see what a web application firewall is.
- Absorbing floods of traffic; see what DDoS protection is.
- DNS that is independent of your host, so moving hosts is simpler.
What are the risks and downsides?
- Stale content: cached files or pages can show old versions until purged.
- Wrong SSL mode can cause redirect loops or leave the origin connection unencrypted.
- Caching pages for logged-in users or carts can leak personal content. Exclude those paths.
- Your logs show Cloudflare addresses unless the real visitor address is forwarded and configured.
- You add a dependency: if the provider has an outage, your site is affected.
Who should use it?
Sites with visitors in several countries, image-heavy or busy sites, shops, and sites that have been attacked or scraped gain the most. A small local site on a fast host gains less, although the free DNS and security features are still useful. If you run WordPress on a host that already includes a CDN and firewall, you may not need a second layer.
What are the common mistakes?
- Switching nameservers before copying every record, and losing email.
- Leaving the origin open to the whole internet, so attackers can bypass the proxy.
- Caching everything and breaking logins.
- Forgetting to purge the cache after a deployment.
- Not testing from a network outside your own.
A worked example: switching a small shop to Cloudflare
A shop owner with a few thousand visitors a month copies their DNS records into Cloudflare, notes that the MX and SPF entries are there, and changes the nameservers at the registrar on a Tuesday evening. By morning the site resolves through Cloudflare. They set SSL to full (strict) after confirming the host has a valid certificate, enable caching for images and scripts, and add a rule that bypasses the cache for the cart, checkout and account pages. Page load for visitors far from the server falls noticeably, and the host’s traffic graph drops.
A week later a customer reports that an old price appears on a product page. The owner finds that the page was cached before an update and adds a purge to their update routine. The setup is not set-and-forget, but it is manageable.
What if you already have a CDN from your host?
Some hosts include a CDN and a firewall. Putting a second proxy in front of it can duplicate work or cause confusing cache behaviour. Check what your host provides first, read its documentation and ask support whether using Cloudflare alongside is supported. If the built-in tools cover your needs, you may not need the second layer. If you do want Cloudflare’s DNS or specific features, use it with the host’s guidance, test carefully and keep one place where caching rules are decided.