Skip to content

Cloudflare shows: Error 1016 Origin DNS error

When trying to enable Cloudflare on your domain name, you may see a page with an error like this:

Error 1016
Origin DNS Error

There are multiple situations and reasons why you may see it.

The domain is using Cloudflare nameservers

The most common cause for this error is that the domain that your domain in Cloudflare is configured to point to a domain which is also on Cloudflare. This doesn't work, because Cloudflare should point to your InfinityFree hosting account instead.

This error is usually the result of letting Cloudflare automatically generate DNS records while also having the Cloudflare integration in the control panel enabled.

As a rule of thumb, you can use Cloudflare through either the control panel integration (partial integration) or by using Cloudflare's nameservers (full integration). Either method works, but never use both Cloudflare integration methods.

There are a couple of ways you can try to fix this.

If you want to use the Cloudflare control panel integration

If you want to use the control panel integration, you need to change your domain's nameservers to point to the InfinityFree nameservers instead. If you don't know how, please see the article How to use InfinityFree nameservers for more information.

If you want to use Cloudflare's nameservers

The first thing you need to do is go into your InfinityFree control panel and disable Cloudflare for your domain there. If you're using Cloudflare's nameservers, Cloudflare should be turned off in your control panel.

After that, you need to make sure that your domain's DNS records at Cloudflare are correct.

You can try to fix the records manually by first deleting all DNS records currently in Cloudflare. Then, you'll want to add the following DNS records:

  • CNAME record with source @ and the target being your account's main domain. How to find your main domain?
  • CNAME record with source www and target @.
  • An additional CNAME record for every subdomain. So if you have a subdomain "blog", you need to add a CNAME record with source blog and target @.

Alternatively, you can let Cloudflare fix it for you by letting them rescan your DNS records. To do so, you can follow these steps:

  1. Disable Cloudflare in your control panel.
  2. Change your domain's nameservers back to the InfinityFree nameservers.
  3. Remove your domain from Cloudflare.
  4. Wait for at least 48 hours.
  5. Add the domain to Cloudflare again and let Cloudflare scan the new DNS records.

The domain is using InfinityFree nameservers

If your domain name is using InfinityFree nameservers, that means you are using the Cloudflare integration in the control panel. While this integration is an easy way to setup Cloudflare, it has a number of limitations.

One of these limitations is that subdomains don't work. If you're trying to setup a subdomain of your own domain while using the control panel Cloudflare integration, you may also see the "Error 1016: Origin DNS error" page.

Unfortunately, there is no way to make subdomains work with the control panel Cloudflare integration. This means you need to disable the control panel Cloudflare integration.

If this happens, you have two options:

  • Don't use Cloudflare on your website.
  • Sign up with Cloudflare yourself and use Cloudflare to manage your domain's DNS. Please note that this involves managing your own DNS records, which you need to be comfortable with.