Free migrationUK web hosting from £2.99 a month, with backups every six hours and a 60-day money-back guarantee.UK web hosting from £2.99 a month.See hosting plans

How to use Cloudflare with your hosting

On this page

This guide shows how to put your website behind Cloudflare while keeping the site and email hosted with us.

Before you start

Add your site to Cloudflare

  1. Sign up or log in at Cloudflare.
  2. Click Add a site (the wording may vary) and enter your domain.
  3. Choose a plan. The free plan is fine for most sites.
  4. Cloudflare scans your domain and copies the DNS records it finds.

Check the DNS records

Cloudflare’s scan doesn’t always find everything. Go through the list and compare it with the Zone Editor in cPanel. Check for:

  • The A records for your domain and www.
  • The MX record, and the A record for mail.yourdomain.co.uk.
  • TXT records for SPF, DKIM and DMARC. DKIM records are long, so check the whole value was copied. See how to set up SPF, DKIM and DMARC.
  • Any records for other services, such as Microsoft 365.

Add anything that’s missing in Cloudflare.

Keep email records grey

Each record in Cloudflare has an orange cloud (Proxied) or a grey cloud (DNS only). Only your website records should be orange. Set these to DNS only:

  • The A record for mail.yourdomain.co.uk, and any records for webmail, cpanel or ftp.
  • Anything your MX record points at.

If mail records are proxied, email will stop working.

Change your nameservers

Cloudflare gives you two nameservers. Replace our nameservers with these at your domain registrar. If your domain is registered with us, see how to change your nameservers. The change can take up to 24 to 48 hours. See how to check DNS propagation.

Set the SSL mode

  1. In Cloudflare, open SSL/TLS.
  2. Set the encryption mode to Full (strict).

Don’t use Flexible. It makes Cloudflare talk to our server without encryption, and since your site already redirects to https, this causes a redirect loop. See how to fix too many redirects.

If it doesn’t work

  • Too many redirects. Check the SSL mode is Full (strict), not Flexible.
  • Email stopped. Check the mail records are DNS only and the MX record is present in Cloudflare.
  • SSL error from Cloudflare. Check the certificate on our side is valid. Run AutoSSL again in cPanel if needed.
  • Old site still showing. Allow time for the nameserver change to spread.

Good to know

Once your nameservers point at Cloudflare, our Zone Editor stops being used. Any DNS changes, such as adding a record for a new service, must be made in Cloudflare from then on. If you stop using Cloudflare, check the records in cPanel are up to date before switching back to ns1.whgbdns.com to ns4.whgbdns.com.

Still stuck? Open a support ticket and we’ll help.

Still stuck? Open a support ticket from your client area. Tell us your domain and which step went wrong, and we'll take it from there.
Register a domain

Search for a .co.uk, .uk, .com and more, and manage it next to your hosting.

Search domains
Open in new tab