Choose a plan

Cloudflare in front of your website: when it helps and how to set it up

What you gain and risk with Cloudflare in front of a site hosted at NBT Host, how to move DNS without losing email and the SSL setting that avoids loops.

  • Updated
guide · speed
Steps
16
Reading time
5min
Sections
6
Start the guide

Cloudflare can sit between your visitors and our server: it receives the requests, keeps static files (images, CSS, JavaScript) on its servers around the world and filters out some of the bad traffic. The free plan is enough for a small website. But it isn't required and it isn't always a gain: if your visitors are in Romania and the website is already fast, the difference is small, and a wrong setting can take down your website or your email.

What you'll achieve

  • decide whether Cloudflare is useful for you;
  • move your domain's DNS to Cloudflare without losing your website or email;
  • choose the right SSL setting and clear the cache after changes.

When it helps and when it doesn't

HelpsDoesn't help or gets in the way
visitors from many countries, far from the EU servera website with visitors almost only from Romania, already fast
lots of images and static filesa store with a cart and customer accounts, if you also cache the dynamic pages
attacks or bot traffic on the websiteif you don't want to manage yet another panel

Two things to know up front:

  • With your DNS at Cloudflare, the DNS zone in Enhance no longer counts. From then on, you add every record (for email, for verifications, for subdomains) at Cloudflare (see DNS zone editor: A, CNAME, MX and TXT).
  • With the proxy turned on (the orange cloud), issuing and renewing our Let's Encrypt certificate may fail. That's why you should write to us before turning on the proxy: we check the domain's certificate and tell you which option works for your website.

Before you start

  • You have a Cloudflare account (https://dash.cloudflare.com) and access to your domain registrar (or your domain is with us and you ask us to change the nameservers).
  • The website already runs on https://, with the Let's Encrypt certificate issued (see The free SSL certificate (Let's Encrypt)).
  • You've noted down your current DNS records: in Enhance, “Websites” » the website » “Domains” » “Manage” » “DNS records”.

The steps

A. Add the domain to Cloudflare

  1. In Cloudflare, click Add a domain and choose the Free plan.
  2. Cloudflare reads the existing records on its own. Compare the list with the one in Enhance and add whatever is missing. The ones most often forgotten:
    • mail (A), the MX record, hostingcp._domainkey (DKIM), _dmarc and the SPF record;
    • the subdomains you use.
  3. For SPF, use the server's IP address, as described in Why my emails go to spam: SPF, DKIM, DMARC (step 1): v=spf1 a mx ip4:185.230.138.193 ~all.
  4. All email records (mail, MX, DKIM, SPF, DMARC) stay DNS only (the gray cloud). Email doesn't go through the Cloudflare proxy.
  5. Delete the AAAA records from your previous provider, if there are any: our zone doesn't use IPv6 for the website.
  6. For now, also leave the website records (@ and www) on DNS only.

B. Change the nameservers

  1. Cloudflare gives you two nameservers, like nume.ns.cloudflare.com. Set them at your domain registrar in place of the current ones (the steps for registrars are in How to point your domain to NBT Host). For a domain registered through NBT Host, write to us and we'll change them.
  2. Wait until Cloudflare shows the domain as Active. It usually takes a few hours (see DNS propagation and TTL: how to plan a change).
  3. Check the website and send a test email to and from an address on the domain.

C. Set SSL correctly

  1. In Cloudflare, under SSL/TLS, choose Full (strict) mode. Not Flexible: with Flexible, Cloudflare requests the website from us over http://, “Force https” in Enhance sends it back to https:// and the website gets stuck in a loop (see “Too many redirects”: how to stop the loop).

D. Turn on the proxy, after we talk

  1. Once you've written to us and we've checked the certificate, switch @ and www to Proxied (the orange cloud).
  2. Check the website from a private window, plus the forms and, if you have a store, the cart.

E. Clear the cache after changes

  1. Cloudflare keeps your images, CSS and JavaScript. After you change them on the website, go to Caching » Configuration in Cloudflare and use Purge Cache (purge everything or only the changed addresses).
  2. If you also have a cache plugin in WordPress, clear it first, then Cloudflare (see WordPress caching: what it is and how to use it).

If you want to stop using it

Set the nameservers back to ns1.nbt-host.ro and ns2.nbt-host.ro at your registrar. The zone in Enhance is still there; just check that it has the records you added at Cloudflare in the meantime.

If something doesn't work

  • “Too many redirects” (ERR_TOO_MANY_REDIRECTS). The SSL mode is Flexible. Switch to Full (strict) (step 10).
  • Email stops arriving or sending. An email record is missing at Cloudflare or mail is set to Proxied. Compare with the list in Enhance and switch the email records to DNS only.
  • The certificate no longer renews. The proxy interferes with the Let's Encrypt check. Temporarily switch @ and www to DNS only and write to us.
  • Cloudflare shows error 521 or 522. Cloudflare can't reach our server: the A record points to a different IP or your IP address is blocked. Check the IP in Enhance (the website's page, “IPv4 address”) and write to us.
  • Uptime monitoring says the domain doesn't point to the server. On a VPS, the proxy hides the server's IP; the address can only be checked on DNS only (see How to add a tool or an add-on).
  • Your domain was bought through Cloudflare Registrar. You can't set other nameservers there: your DNS stays at Cloudflare (see How to point your domain to NBT Host).
Support

Stuck? We'll do it together.

Tell us which step isn't working and, if you can, send a screenshot. We reply during business hours.

Phone and WhatsApp+40 775 396 021
HoursMonday–Friday, 9:00–18:00 Romanian time (EET/EEST)

Never send us your password on WhatsApp or by email. What information helps us solve it on the first try: how to ask for help.