Cloudflare setup for a small business website, step by step
Add your site to Cloudflare, check the imported DNS, switch nameservers, pick the right SSL mode and set safe caching, without breaking your email.
Cloudflare sits between your visitors and your web server. It answers DNS queries for your domain, serves cached copies of your pages from data centres close to the visitor, issues a free certificate for HTTPS and filters out much of the junk traffic that hits any public site. For a small business site the setup takes under an hour. The risky part is the switch of nameservers: a missed record there can take down email for a day.
Disclosure: some links in this guide are partner links. If you buy through them, MMIX may earn a commission; your price stays the same.
Marketing MIX has run client domains and websites since 2012, and Cloudflare is part of most of the stacks we set up. This is the order we follow.
What Cloudflare does for a small site
Once your domain uses Cloudflare's nameservers, Cloudflare hosts your DNS. For each hostname you decide whether traffic goes through Cloudflare's network (proxied, shown as an orange cloud) or straight to your server (DNS only, a grey cloud). Proxied hostnames get the cache, the free edge certificate and protection against floods of requests. DNS-only hostnames behave exactly as they did at your old DNS provider.
Plans, and what stays where it is
Cloudflare has a Free plan, and it covers the needs of most small business websites. You keep your domain where it is registered and your site where it is hosted. Only the nameservers change.
If you have not bought the domain yet, start with how to buy a domain name. You can register it at any registrar, for example through the Namecheap domain search, and point it at Cloudflare afterwards.
Step-by-step: setting up Cloudflare
Step 1: Prepare before you start
Log in to the place that currently hosts your DNS (usually the registrar or the web host) and export or screenshot every record. Pay attention to:
A and AAAA records for the website.
CNAME records for www, subdomains and services such as a booking tool or a help desk.
MX records and the TXT records for SPF, DKIM, DMARC and domain verification.
Note which company runs your email. Then check whether DNSSEC is switched on at the registrar. If it is, turn it off before you change nameservers and wait for the change to take effect. An old DNSSEC record left at the registrar makes the domain fail to resolve once Cloudflare takes over. You can switch DNSSEC on again later, from inside Cloudflare.
Our guide to DNS records explains what each record type does.
Step 2: Add the site to Cloudflare
Create the Cloudflare account under a shared company mailbox, the same rule as for the registrar account, and enable two-factor authentication. Add your domain, choose a plan and let Cloudflare scan your existing records.
Step 3: Review the imported DNS records
The scan finds most records, rarely all of them. Compare its list with the one you saved in Step 1 and add anything missing by hand, especially DKIM records, which sit on hostnames the scan cannot guess.
Then set the proxy status:
Proxy the website hostnames: the root domain and www.
Keep DNS only for anything connected to email (the hostname your MX record points to, webmail, autodiscover), for FTP or SSH hostnames, and for services that need a direct connection to the server.
MX and TXT records are never proxied; Cloudflare shows them without a cloud. The mistake to avoid is proxying an A record called mail or similar, which breaks mail delivery.
Step 4: Change the nameservers at your registrar
Cloudflare gives you two nameservers with names like ana.ns.cloudflare.com. In your registrar's panel, replace the existing nameservers with those two, and remove any others. The change usually spreads within a few hours, though registrars quote up to 24–48 hours. Cloudflare emails you and marks the domain as active when it sees the new nameservers.
While the change spreads, some visitors use the old DNS and some use Cloudflare. That is fine, as long as both sets of records point to the same server.
Step 5: Set SSL/TLS to Full (strict) and force HTTPS
The SSL/TLS encryption mode controls how Cloudflare talks to your server. Cloudflare's SSL mode docs describe each option; the short version:
Flexible encrypts traffic between the visitor and Cloudflare only. The leg to your server goes unencrypted, and the combination with a server-side HTTPS redirect causes the "too many redirects" error.
Full encrypts both legs and accepts any certificate on the server, including an expired or self-signed one.
Full (strict) encrypts both legs and requires a valid certificate on the server. This is the setting to aim for.
Most hosts issue a free certificate for your domain; alternatively Cloudflare can generate an Origin CA certificate for you to install on the server. Once the server has one, choose Full (strict). Then turn on Always Use HTTPS under Edge Certificates, so every HTTP request is redirected to HTTPS. Our SSL certificate guide covers server certificates and mixed content warnings in detail.
Step 6: Configure caching and basic security
By default Cloudflare caches static files such as images, CSS and JavaScript, and passes HTML pages through to your server. For most small sites that default is right. A few settings worth knowing:
Purge cache after you change a stylesheet or replace images, so visitors see the new version.
Development Mode pauses caching for a few hours while you make changes.
Caching HTML with cache rules can speed up a static site a lot, but on a site with logins, carts or forms it can show one visitor's page to another. Leave it to a developer.
On the security side, review bot protection and the security level, and add rules only when you see a specific problem. Overly strict settings can block payment providers, uptime monitors or your own team.
Step 7: Test the site, the email and the forms
Open the site on several pages in a private window and on a phone, and check the padlock. Send an email to and from the domain. Submit every contact and booking form, because some form services check where the request comes from. Confirm that analytics still counts visits. Finally, switch DNSSEC on in Cloudflare and add the record it gives you at the registrar.
What to check and common mistakes
Missing DKIM or verification records. The scan misses them; mail lands in spam or a service stops verifying.
Proxied mail hostname. Email stops arriving. Set it to DNS only.
Flexible SSL. Redirect loops, and an unencrypted leg between Cloudflare and your server.
DNSSEC left on at the registrar. The domain stops resolving after the nameserver change.
Two people editing DNS in two places. After the switch, records at the old provider no longer apply. Make that clear to everyone who used to edit them.
Firewall rules copied from a forum. Start with the defaults and change them one at a time.
Cloudflare touches the website, the email and every service that relies on DNS. If you run several domains or depend on email for orders, a planned switch with a checklist is the safer route.
Prefer to hand it off? MMIX sets up domain, hosting, email and DNS for you — since 2012. Tell us about your site and we will reply with a plan.
Send your site address. We look at the site, your ads and your search presence and send back what to fix first and a one-month plan. Ads management is quoted after the review.