How to change your domain nameservers to Cloudflare
Moving your DNS to Cloudflare gives you its free CDN, caching and basic protection while your website stays on your EgWeb hosting. This guide shows how to change your domain nameservers to Cloudflare safely, without breaking your website or your email.
Before you start
- Know where your domain is registered. If it is at EgWeb, you change the nameservers from the EgWeb client area.
- Write down your current DNS records from cPanel Zone Editor, especially the A, MX, TXT (SPF, DKIM, verification) and CNAME records. See DNS records explained.
- If DNSSEC is enabled on the domain, turn it off first and remove the DS record. See How to set up DNSSEC for your domain.
Step 1: Add your domain to Cloudflare
- Create a free account at Cloudflare and choose to add a domain (site).
- Enter your root domain, for example
example.com, without www. - Choose a plan. The Free plan is enough for most websites.
- Cloudflare scans your existing DNS records and imports them.
Step 2: Review the imported DNS records
- Compare the imported list with the records you wrote down. Add anything missing, such as DKIM TXT records or subdomains.
- Keep the orange cloud (Proxied) on for the website records: the root domain and
www. - Set these to grey cloud (DNS only):
mail,webmail,cpanel,ftpand any record used by MX. Cloudflare's proxy only handles web traffic, so email and FTP must point directly to the server. - Check that the MX record points to the correct mail host (your server, Google Workspace or Zoho).
Step 3: Change the nameservers at EgWeb
- Cloudflare shows two nameservers for your domain, for example
name1.ns.cloudflare.comandname2.ns.cloudflare.com. Copy the exact names it gives you. - Log in to the EgWeb client area and go to Domains > My Domains, then open the domain.
- Open Nameservers, choose to use custom nameservers, and replace the current ones with the two Cloudflare nameservers.
- Save the changes. If the domain is registered elsewhere, change the nameservers at that registrar.
- Back in Cloudflare, use the option to re-check nameservers. Cloudflare emails you when the domain is active. This can take from a few minutes to around 24 hours. See Why DNS changes take time.
Step 4: Set SSL correctly
- Make sure your hosting has a valid certificate, see How to get a free SSL certificate (AutoSSL).
- In Cloudflare, open SSL/TLS and set the encryption mode to Full (strict).
- Avoid the Flexible mode. With an HTTPS redirect on the server it causes a redirect loop (ERR_TOO_MANY_REDIRECTS).
Common problems
- Email stopped working: an MX or mail record is missing or proxied. Set mail records to DNS only and check the MX value.
- Too many redirects: change SSL mode to Full (strict).
- Cannot reach cPanel through cpanel.example.com: make that record DNS only, or use your server hostname.
- Domain still "Pending" in Cloudflare: check that both nameservers were saved exactly and that the old ones were removed.
Frequently asked questions
Will my site go down while I switch?
Not if all records were copied correctly. Both the old and new DNS point to the same server during propagation.
Can I go back to EgWeb nameservers later?
Yes. Set the nameservers back to the ones in your hosting welcome email. Turn off Cloudflare DNSSEC first if you enabled it.
Do I still need hosting if I use Cloudflare?
Yes. Cloudflare is not hosting. Your files and email still live on your EgWeb hosting.