How to use Cloudflare with your hosting
Help centreOn this page
This guide shows how to put your website behind Cloudflare while keeping the site and email hosted with us.
Before you start
- Make sure your site already works on our hosting and has an SSL certificate. See how to install a free SSL certificate.
- Keep cPanel open on the Zone Editor page so you can compare records. See how to edit DNS records in cPanel.
Add your site to Cloudflare
- Sign up or log in at Cloudflare.
- Click Add a site (the wording may vary) and enter your domain.
- Choose a plan. The free plan is fine for most sites.
- 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
- In Cloudflare, open SSL/TLS.
- 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.
Search for a .co.uk, .uk, .com and more, and manage it next to your hosting.