# Do you need Cloudflare? What it does and how to set it up

> What Cloudflare's free plan includes, who benefits, what changes when you put it in front of a site and the risks to watch.

Source: https://comparehostingonline.com/guides/do-you-need-cloudflare/

## Short answer

Cloudflare is a network that sits in front of your site and can provide DNS, a CDN, HTTPS and some attack filtering, including on a free plan. You do not need it to run a site, but it often helps speed and protection.

Last verified Nov 28, 2026 · [How we test](https://comparehostingonline.com/methodology/)

At a glance

-   **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](https://comparehostingonline.com/guides/what-is-a-cdn/) for the caching side, and [what an SSL certificate is](https://comparehostingonline.com/guides/what-is-an-ssl-certificate/) for HTTPS modes.

## How do you set Cloudflare up?

Our [nameservers guide](https://comparehostingonline.com/guides/nameservers-explained/) explains the switch in more detail, including the DNSSEC step that is easy to forget.

1.  1
    
    **Add your domain**
    
    Cloudflare scans and imports your existing DNS records.
    
2.  2
    
    **Review every record**
    
    Check A, CNAME, MX and TXT entries against your list; see what DNS records are.
    
3.  3
    
    **Change the nameservers**
    
    At your registrar, replace the nameservers with the two Cloudflare gives you.
    
4.  4
    
    **Set the SSL mode**
    
    Use full or full (strict) once the origin has a valid certificate.
    
5.  5
    
    **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](https://comparehostingonline.com/guides/what-is-a-web-application-firewall/).
-   Absorbing floods of traffic; see [what DDoS protection is](https://comparehostingonline.com/guides/what-is-ddos-protection/).
-   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](https://comparehostingonline.com/hosting-types/managed-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.

## Sources and further reading

-   [Cloudflare DNS documentation](https://developers.cloudflare.com/dns/)
-   [Cloudflare Cache documentation](https://developers.cloudflare.com/cache/)
-   [Cloudflare DDoS protection documentation](https://developers.cloudflare.com/ddos-protection/)
-   [Let’s Encrypt: FAQ](https://letsencrypt.org/docs/faq/)

## Common questions

Is Cloudflare free?

There is a free plan that covers DNS, a CDN and basic protection. Paid plans add more features and support. Check the current plan comparison, because limits and prices change.

Does Cloudflare replace my web host?

No. It sits in front of your host. Your files, database and email still live on your hosting, and Cloudflare fetches from it when it has no cached copy.

Will Cloudflare make my site faster?

Usually for cached content and distant visitors. Uncached dynamic pages still depend on your origin. A wrong setup, such as an incorrect SSL mode or poor cache rules, can slow or break a site, so test.

What is the safest way to switch to Cloudflare?

Copy every DNS record first, check MX and TXT entries, lower TTLs a day ahead, change the nameservers, set a strict SSL mode and test the site and email. Keep your old DNS notes until everything works.

Can I use Cloudflare with any host?

Generally yes, as long as you can change your domain's nameservers or DNS records. Some hosts include their own CDN, which may make a second one unnecessary. Check your host's documentation.

## Related

[What is a CDN?](https://comparehostingonline.com/guides/what-is-a-cdn/) [What is DDoS protection?](https://comparehostingonline.com/guides/what-is-ddos-protection/) [Nameservers explained](https://comparehostingonline.com/guides/nameservers-explained/)

## More guides

[Ecommerce hosting checklist: what an online shop needs from a host](https://comparehostingonline.com/guides/ecommerce-hosting-checklist/) [Email hosting vs web hosting: should you keep email separate?](https://comparehostingonline.com/guides/email-hosting-vs-web-hosting/) [Hosting money-back guarantees: what is covered and how to claim](https://comparehostingonline.com/guides/hosting-money-back-guarantee/) [Hosting uptime guarantees and credits: what they really promise](https://comparehostingonline.com/guides/hosting-uptime-guarantee-credits/) [How to cancel web hosting without losing your site](https://comparehostingonline.com/guides/how-to-cancel-web-hosting/) [How to check who hosts a website](https://comparehostingonline.com/guides/how-to-check-who-hosts-a-website/)

MH

**[Muhammad Hamza](https://comparehostingonline.com/team/muhammad-hamza/)** Founder & Editor

Writes and signs off every comparison, and runs the compliance reviews. Has worked on SOC 2 and HIPAA compliance programs for companies.

Our [editorial policy](https://comparehostingonline.com/editorial-policy/) and [testing method](https://comparehostingonline.com/methodology/) are public.
