Cloudflare error 1016: Origin DNS error, and how to fix the record behind it

Error 1016 means Cloudflare can't resolve your origin's hostname. How to find the broken CNAME or A record, and the usual causes with Workers, tunnels and SaaS hosts.

· 6 min read · By the Spot Downtime team

Error 1016 "Origin DNS error" is shown by Cloudflare when it can't work out where your origin server is. Cloudflare sits between visitors and your server. To forward a request it needs an IP address for the origin, and in this case the DNS lookup for the origin's name failed. The visitor sees a Cloudflare page, and the HTTP status is 530.

It is easy to confuse with the 52x family such as 522. Those mean Cloudflare found the origin and the connection then failed. With 1016 there was no address to connect to at all, so the fix is in DNS, not on your web server.

What triggers it

For a proxied record (orange cloud), Cloudflare resolves the record's target to find the origin. If the record is an A or AAAA record, the IP is right there. If it is a CNAME, Cloudflare must resolve the target hostname, and that is where things go wrong. You get 1016 when the target name does not exist, has no A or AAAA records, or points back at something Cloudflare can't resolve.

Find the broken record

  1. Open the domain in the Cloudflare dashboard, then DNS, and find the record for the hostname showing the error.
  2. Look at what it points to. For a CNAME, copy the target name.
  3. Resolve that target yourself and see whether it returns an address:
bash
dig +short origin.example.net A
dig +short origin.example.net AAAA
dig origin.example.net | grep -E "status|ANSWER"

An empty answer, or status: NXDOMAIN, is the cause. NXDOMAIN means the name doesn't exist, which is explained in DNS_PROBE_FINISHED_NXDOMAIN. A SERVFAIL instead points to a problem with the target's DNS provider, see DNS SERVFAIL.

DNS lookupQuery A, AAAA and CNAME records for the origin name and see exactly what resolves.

Common causes

A typo or a deleted target

The CNAME points to app-prod.example.net and someone removed that record, renamed the host, or mistyped it when creating the record. Correct the target, or recreate the missing record at the DNS provider that hosts it.

An IP record was removed during a migration

When moving servers, a common slip is deleting the old A record before adding the new one. Add the new IP and the error clears as soon as Cloudflare's own lookup succeeds. Cloudflare is quick to pick up its own zone's changes, so you rarely have to wait long.

The CNAME target is on a hosting platform that you removed

A CNAME to a name like yourapp.platform-host.com breaks if the project, domain or app was deleted on the host. Check the project still exists and still has the domain attached.

A Worker or load balancer fetching a bad hostname

If a Cloudflare Worker calls fetch() on a hostname in your zone, that hostname needs a valid DNS record to resolve. Likewise, a load balancer pool whose origin address is a hostname fails with this error when the name has no address. Review the pool origins and the hostnames your Worker code builds.

A CNAME to another Cloudflare zone

Pointing a proxied record at a hostname that is itself proxied by Cloudflare under a different account can fail, because it must resolve through to a real origin. Cloudflare for SaaS custom hostnames have their own requirement: the fallback origin must be set and its DNS record must resolve.

Don't confuse it with error 1014

Error 1014 is the related cross-user CNAME error. If the hostname resolves but you still see a 1xxx page, read the error code on the page: each 1xxx code has its own cause, and the number is the fastest way to the right fix.

Fix it

  • Make the target of every proxied CNAME resolve to an A or AAAA record.
  • For a simple setup, replace the CNAME with an A record to the origin's IP address.
  • If the origin is behind a CNAME you don't control, ask whether the provider changed the hostname.
  • For a CNAME on the zone apex, see CNAME at the root domain for how flattening works.

After editing, reload the page. If it still fails, test the origin directly to separate DNS from the server itself:

bash
# Replace 203.0.113.10 with your origin IP
curl -I --resolve example.com:443:203.0.113.10 https://example.com/

A normal response here confirms the server is fine and the remaining problem is the record. If it fails, you are looking at a server problem and not a DNS one; continue with error 522 or 521.

Catch it when a DNS change goes wrong

Error 1016 usually follows a DNS edit, and the person who made the edit often checks only that the dashboard saved it. A website monitor on the affected hostname will report the 530 within a check interval, and a DNS monitor can watch the records themselves for unexpected changes. Spot Downtime checks from three regions and confirms before alerting, so you get one clear alert instead of noise.

Get new guides by email

Practical posts on monitoring, outages, error fixes and on-call, when they're published. No spam.

Unsubscribe from any email with one click. See our privacy policy.

Keep reading