When a domain uses Cloudflare's nameservers, the DNS records the internet sees are the ones on Cloudflare, not the ones in NovaPanel. Until now that meant copying every record by hand, and again every time something changed. From NovaPanel 2.0 a customer can connect their Cloudflare account and the panel copies the domain's DNS to Cloudflare for them. It is available on every licence.
This page is about copying DNS records. For which ports and services work through Cloudflare's proxy, see Running behind Cloudflare.
What the sync changes, and what it never touches
NovaPanel's DNS stays the source of truth, and the copy goes one way, to Cloudflare. What it may change there is deliberately narrow:
- It adds the records Cloudflare is missing, and labels each one as made by NovaPanel.
- It removes only records carrying that label, once they are gone from the panel.
- It never edits or deletes a record you made on Cloudflare. Where one of yours disagrees with the panel (a different address for the same name, or a second SPF record), it adds nothing beside it and reports a conflict instead, because adding would split traffic or break mail.
It copies A, AAAA, CNAME, MX, TXT, SRV and CAA records, and NS records for subdomains. Records Cloudflare manages itself (SOA, the domain's own nameservers, DNSSEC) are left out. A, AAAA and CNAME records are created as DNS only, not proxied.
Create a Cloudflare API token
- In Cloudflare, go to My Profile → API Tokens and create a token.
- Use the Edit zone DNS template, for the zones (domains) you want synced.
- Copy the token.
Connect and sync
- In the customer panel, open DNS Editor and find the Cloudflare DNS sync card.
- Paste the token into Cloudflare API token and click Connect.
- Your domains are listed. Turn on Sync for each domain you want copied. A domain marked Not in this Cloudflare account is not one of the zones the token can see.
- Click Sync now to copy straight away.
Each domain shows its Last sync and a summary such as 12 records in sync, 2 added, 0 removed. Records left alone because of a conflict are named underneath, so you can decide which version is right and fix it on one side.
After that, every synced domain is checked again every 15 minutes. That picks up DNS the panel changed itself (a new subdomain, a new site) and puts back records the panel made if they were changed on Cloudflare by hand.
The token is stored on the server and never sent back to the browser.
Requirements
- The domain's DNS has to be managed on this server: there must be a DNS zone for it in the panel to copy from. If none of your domains has one, the card says there is nothing to copy.
- The domain has to be a zone in the same Cloudflare account as the token.
Disconnect
Disconnect Cloudflare forgets the token and stops syncing every domain. Records already on Cloudflare stay there; remove the ones you no longer want on Cloudflare yourself.