Web hosting

Cloudflare setup guide (2027): free plan, DNS, SSL Full (strict), email records and AI crawlers

10 min read By

Cloudflare's free plan gives most websites free SSL, a CDN and DDoS protection. Here is how to set it up without breaking your website or your email — the exact settings, in the right order, and the mistakes we have fixed for customers.

In short To set up Cloudflare: create a free account, add your domain, check that every DNS record was copied, then change your domain's nameservers at your registrar to the two Cloudflare gives you (turn off DNSSEC there first). Keep website records (A, AAAA, CNAME for @ and www) proxied, set mail and verification records to DNS only, choose SSL/TLS mode Full (strict), and turn on Always Use HTTPS. Activation can take up to 24 hours.

What Cloudflare does, and whether you need it

Cloudflare sits between your visitors and your web server. When a record is "proxied" (the orange cloud), visitors connect to Cloudflare, and Cloudflare fetches the page from your server. That lets it hide your server's address, absorb attacks, serve cached files from a location near the visitor, and give you a free HTTPS certificate at its edge. Cloudflare describes its free plan as providing "free SSL, CDN, DDoS protection and more".

You do not need Cloudflare for a website to work — your hosting already serves it over HTTPS. It is worth adding when:

  • you want an extra shield against large attacks in front of your server;
  • visitors come from far away and you want images, CSS and JavaScript served from nearby;
  • you want one place to manage DNS with a clear interface and fast changes.
  • It is less useful if your site is mostly logged-in pages (dashboards, carts), because those must not be cached anyway.

Before you start: write down what you have

Most Cloudflare problems happen because something that worked before was not copied across. Ten minutes of preparation avoids them:

  • Log in to your domain registrar (GoDaddy, BigRock, Hostinger, Namecheap…) and note where your DNS is managed today.
  • Export or screenshot every DNS record: A, AAAA, CNAME, MX, TXT (SPF, DKIM, DMARC, Google or Microsoft verification), SRV.
  • Note your website's server address — on Cloud Ninza it is shown on the Domains page of your dashboard.
  • If you use business email (Google Workspace, Microsoft 365, or mailboxes on your hosting), write down its MX and mail records separately. These are the ones that break most often.
  • Check whether DNSSEC is switched on at your registrar. Cloudflare says you must turn it off before changing nameservers.

Step by step: set up Cloudflare's free plan

This is the order we use when we move customer domains. It takes 20–30 minutes of work, plus waiting for the nameserver change.

  • 1. Create a free Cloudflare account and choose "Onboard a domain". Enter your main domain (example.com, without www) and pick the Free plan.
  • 2. Cloudflare scans your existing DNS. Compare its list with the records you wrote down and add anything it missed — DKIM and DMARC TXT records and mail subdomains are often missed.
  • 3. Set the proxy status of each record (the next section explains which). Proxying is on by default for website records.
  • 4. Turn off DNSSEC at your registrar if it is on.
  • 5. At your registrar, replace the current nameservers with the two Cloudflare assigned to you. Remove any others.
  • 6. Back in Cloudflare, wait for the domain to show as active. Cloudflare says verification can take up to 24 hours; it is often much quicker.
  • 7. Under SSL/TLS, set the encryption mode to Full (strict) once your server has a valid certificate.
  • 8. Under SSL/TLS → Edge Certificates, turn on Always Use HTTPS.
  • 9. Test: open your site on http:// and https://, with and without www, on a phone on mobile data. Send and receive a test email.
  • 10. Only now, re-enable DNSSEC — this time from Cloudflare's DNS settings, adding the DS record it gives you at your registrar.

Which records to proxy, and which to leave DNS only

Cloudflare can only proxy A, AAAA and CNAME records — the ones that point a name at a web server. MX and TXT records are always DNS only. Cloudflare's own documentation lists email records, domain verification records and non-HTTP services as things that should be DNS only, because its proxy handles web traffic only.

RecordExampleProxy statusWhy
WebsiteA @ and A www (or CNAME www)Proxied (orange)Gets caching, DDoS protection and edge SSL
Mail server nameA mail.example.comDNS only (grey)Email programs connect on mail ports, which the web proxy does not carry
WebmailA webmail.example.comDNS onlyKeeps it on the same certificate as your mail server; avoids confusion
MXMX @ → mail.example.comAlways DNS onlyTells other servers where to deliver your email
SPF, DKIM, DMARCTXT @, mail._domainkey, _dmarcAlways DNS onlyRead by receiving mail servers
Verificationgoogle-site-verification, MS=…Always DNS onlyRead by Google, Microsoft, Meta
SSH, FTP, databasesA server.example.comDNS onlyNot web traffic

The rule of thumb

If a browser visits it, proxy it. If anything else connects to it — an email app, a phone's mail settings, an SSH client — leave it grey. When in doubt, DNS only is the safe choice: it behaves exactly as it did before Cloudflare.

SSL/TLS mode: why Full (strict) and never Flexible

Cloudflare has two connections to secure: visitor → Cloudflare, and Cloudflare → your server. The encryption mode decides the second one:

ModeCloudflare → your serverUse it?
OffNo encryption anywhereNo
FlexiblePlain HTTP — your server is never asked for HTTPSAvoid: data travels unencrypted, and it causes redirect loops
FullHTTPS, but the certificate is not checkedOnly while your server's certificate is being issued
Full (strict)HTTPS with the certificate checked (Let's Encrypt or Cloudflare Origin CA)Yes — the right setting
Strict (SSL-only origin pull)Always HTTPS with validationAdvanced setups

The "too many redirects" loop

This is the most common Cloudflare mistake we see. The hosting is set to force HTTPS, and Cloudflare is on Flexible. A visitor asks for https://, Cloudflare fetches http:// from the server, the server answers "go to https", Cloudflare passes that on — forever. The browser shows ERR_TOO_MANY_REDIRECTS. The fix is one setting: change Flexible to Full (strict).

Getting a certificate on your server first

Full (strict) needs a valid certificate on your server. On Cloud Ninza hosting, a free Let's Encrypt certificate is issued and renewed automatically once the domain points to us, including behind Cloudflare. If you switch to Full (strict) before that certificate exists, Cloudflare shows an error page — use Full for those few minutes, then switch to Full (strict).

Keep your email working through the switch

Email is where a Cloudflare move usually goes wrong, because nobody visits the MX record in a browser and the problem shows up hours later as bounced mail. Check three things after the switch:

  • The MX record points to the same mail server as before, and mail.example.com is DNS only.
  • You have exactly ONE SPF record (one TXT starting with v=spf1). Two SPF records make every receiver treat SPF as failed.
  • Your DKIM (for example mail._domainkey) and DMARC (_dmarc) TXT records were copied in full — long DKIM keys are sometimes cut off when pasted.

A real case: Email Routing took over a mailbox (anonymised)

In November 2026 a customer's email stopped arriving in their mailboxes on our server. Cloudflare Email Routing had been switched on for the domain, which locks the MX records to Cloudflare's own mail servers, and the domain also had two SPF records. Incoming mail went to Cloudflare instead of the mailboxes, and outgoing mail failed authentication. Turning off Email Routing, pointing MX back to the mail server and merging the SPF into one record fixed both directions. If you do not use Email Routing, leave it off.

Caching and speed settings on the free plan

Out of the box Cloudflare caches static files — images, CSS, JavaScript, fonts — and not your HTML pages, which come from your server every time. That default is safe for every kind of site. Before you change it:

  • Never cache pages that change per visitor: logins, dashboards, carts, checkouts, "my account". Caching them can show one visitor's page to another.
  • If you want HTML cached, prefer letting your server decide with Cache-Control headers and a Cloudflare cache rule that respects them — your server knows which pages are safe.
  • After a design change, purge the cache (Caching → Configuration → Purge) or version your file names, or visitors keep the old CSS.
  • Your hosting's own page cache still matters: Cloudflare fetches uncached pages from your server, so a fast server means fast misses.

AI crawlers: decide on purpose

Cloudflare now has "AI Crawler and Agent access policies" (it was previously called "Configure AI bot policies") under Security → Settings. It separates three uses: Search (AI search engines that cite and link to you), Agent (an assistant fetching a page for a user) and Training (collecting content to train models). For new domains, Cloudflare's documentation says all three start on Allow.

If you want your business to appear in answers from ChatGPT, Claude, Perplexity and Google's AI features, check that Search and Agent are allowed. On our own domain, an earlier version of this setting was blocking GPTBot and ClaudeBot with an error page even though our robots.txt allowed them — we only found out by fetching our site with those crawlers' names. Check yours the same way, or with our free audit.

Common mistakes (and how to spot them)

Each of these has come up in real setups we have fixed:

  • Flexible SSL with forced HTTPS on the server → endless redirect loop. Fix: Full (strict).
  • Mail and webmail records proxied → email apps cannot connect. Fix: DNS only.
  • Two SPF records after the import → mail marked as failing authentication. Fix: merge into one.
  • DKIM record cut short when pasted → DKIM fails. Fix: copy the whole value again.
  • Nameservers changed but DNSSEC left on at the registrar → the domain stops resolving for some visitors. Fix: turn DNSSEC off before the switch, re-enable from Cloudflare afterwards.
  • An old AAAA (IPv6) record still pointing to a previous host → some visitors and certificate checks reach the old server. Fix: delete it or point it to the right place.
  • A security rule blocking your own admin pages. On our own site, a managed firewall rule once blocked a dashboard page because its address contained a file name that looked like an attack. Check Security → Events when a page shows "Sorry, you have been blocked".

When not to use Cloudflare's proxy

If your site needs the visitor's real connection to your server — some game servers, mail servers, custom TCP services — leave those names DNS only, or use Cloudflare for DNS only. And if your hosting already includes DDoS protection and your visitors are in the same country as the server, the proxy is a nice extra, not a requirement.

Checklist after setup

Go through this once the domain shows active:

  • https://example.com and https://www.example.com both open, with a padlock and no warning.
  • http:// redirects to https:// once, not in a loop.
  • SSL/TLS mode is Full (strict); Always Use HTTPS is on.
  • MX, SPF (one), DKIM and DMARC are present; mail and webmail records are DNS only.
  • A test email to and from an outside address (Gmail, Outlook) works.
  • Logged-in pages are not cached.
  • AI crawler policy is set the way you intend.
  • DNSSEC re-enabled from Cloudflare, if you use it.

Sources

Read on 25 November 2026 on Cloudflare's own documentation. Settings move between dashboard menus from time to time; the names above are the current ones.

Key takeaways

The short version, for anyone skimming:

  • Copy every DNS record before you switch, turn off DNSSEC at the registrar, then change the nameservers to Cloudflare's two.
  • Proxy only website records (A, AAAA, CNAME for @ and www); mail, verification and non-web records stay DNS only.
  • Use SSL/TLS mode Full (strict) with Always Use HTTPS — Flexible plus forced HTTPS causes the "too many redirects" loop.
  • After the switch, check you have one SPF record, a complete DKIM key and DMARC, and send a test email.
  • Decide on AI crawlers on purpose: allow Search and Agent if you want to appear in AI answers.
Host it with us

Web Hosting from ₹1,788/year

Web hosting on cloud servers in India for PHP, WordPress, Node.js, Python and Java sites, from ₹149 a month billed yearly. Backups twice a day (12 AM and 12 PM), last 30 days kept — restore any date yourself from your dashboard, or make your own backup any time · Spam protection: hourly and daily email sending limits per project, and automatic pausing of spam-like sending, keep your domain and our mail servers trusted · Websites or apps, storage and RAM as listed on your plan.

Ready when you are

Hosting from ₹149 a month on servers in India

WordPress, static HTML, PHP, Node.js, Python and Java plans with free SSL and your choice of version. Create your account, pick a plan and pay by UPI, card or netbanking; your hosting is created automatically and you get your login by email, usually within minutes.

Questions

Questions on this topic

Is Cloudflare free?

Yes, Cloudflare has a free plan. Cloudflare describes it as providing free SSL, CDN, DDoS protection and more. Paid plans and add-ons exist for more advanced features.

How long does Cloudflare take to activate?

After you change the nameservers at your registrar, Cloudflare says verifying ownership can take up to 24 hours. In practice it is often much quicker.

Which SSL mode should I use in Cloudflare?

Full (strict). It encrypts the connection from Cloudflare to your server and checks your server's certificate. Avoid Flexible: it sends traffic to your server unencrypted and causes redirect loops when your server forces HTTPS.

Why does my site say "too many redirects" after adding Cloudflare?

Almost always because Cloudflare's SSL mode is Flexible while your server forces HTTPS. Change the SSL/TLS mode to Full (strict).

Should MX and mail records be proxied?

No. MX and TXT records are always DNS only, and Cloudflare advises keeping email records DNS only. Set mail.yourdomain and webmail.yourdomain to DNS only (grey cloud).

Will Cloudflare break my email?

Not if you copy the MX, SPF, DKIM and DMARC records exactly, keep mail records DNS only, and leave Email Routing off unless you mean to use it. Send a test email after the switch.

Do I need to turn off DNSSEC before moving to Cloudflare?

Yes. Cloudflare says you must turn DNSSEC off at your registrar before changing nameservers. You can turn it on again from Cloudflare afterwards.

Does Cloudflare cache my HTML pages?

Not by default: it caches static files such as images, CSS and JavaScript. You can add cache rules for HTML, but never cache logged-in, cart or checkout pages.

Does Cloudflare block AI crawlers like ChatGPT and Claude?

It has AI crawler and agent access policies for Search, Agent and Training. Cloudflare's documentation says new domains start on Allow for all three; check the setting if you want to appear in AI answers.

Can I use Cloudflare with Cloud Ninza hosting?

Yes. Point your proxied A records for @ and www to the server address shown in your dashboard, keep mail records DNS only, and use Full (strict). A free Let's Encrypt certificate is issued and renewed automatically on our side.

Do I need Cloudflare if my hosting has DDoS protection?

Not necessarily. It adds an extra layer and a CDN in front of your server, which helps against very large attacks and distant visitors, but your site works without it.

Can I remove Cloudflare later?

Yes. Make sure your registrar's or host's DNS has all the same records, then change the nameservers back. Keep Cloudflare active until the change has spread.