Switching to Cloudflare DNS fails, and then deletes zone file

SYSTEM INFORMATION
OS type and version 20.04.5 LTS (Focal Fossa)
Webmin version 2.001
Virtualmin version 7.3-1 Pro
Related packages Cloudflare DNS / BIND

Hi there,
I’m trying to convert a domain to use Cloudflare DNS - I’ve done a few, but this one fails. When it fails it also deletes the zone file - so presumably it thinks it went on to CF properly, but actually didn’t.

I get the following error;

Failed to save SPF DNS record : Failed to update DNS host : Failed to setup new DNS zone

I’ve tried with SPF enabled, or disabled. Same error.

The domain exists on CF. I’ve tried with existing records on the zone on CF, and with an empty zone. The zone is set to use CF nameservers. Other zones have created correctly, so I know the API keys are setup properly.

This zone did have an attached alias domain - which I’ve now deleted and it still fails. [EDIT] Same error on a different domain that didn’t have an alias. Some domains work, some don’t…

Hoping someone can help please :slight_smile:

Ta,
Steve.

P.S. Loving Pro so far, being able to use CF and/or Google Domains as the DNS provider is outstanding

Ok I see what’s happening here - if creation of the Cloudflare zone completes but adding records fails, you can end up in this incomplete state. Also, the error message showing what went wrong is being hidden!

Does creation of a new domain where the DNS zone is hosted on Cloudflare work for you? You can configure the default cloud hosting provider at System Settings → Server Templates.

Hiya @Jamie
Thanks for getting back to me.

So I’ve created a new domain using the ‘Create Virtual Server’ option - which sort of worked. Everything went through (once I’d switched the Nameservers at the registrar). But the zone was empty. Creating new records on this zone through VM does work though - but it’s a bit inconvenient having to create a whole zone by hand :slight_smile:

No errors were shown during creation.

I’ll try to create an empty zone and switch it to CF and see what happens. It’s a workaround at least if it does work. [EDIT]: It didn’t.

I don’t seem to be able to move any existing zone across to CF now, so I’m not at all sure what’s happened. Some moved originally but any I try now won’t.

Thanks again,
Steve

@Jamie

It seems the problem is with .co.uk domains - I get the following error;

Adding new DNS zone using Cloudflare DNS …
… failed : Domain redacted.co.uk can be only one level under TLD .uk

This is, unfortunately, not true - for TLD .uk a layperson will never ever be able to create a domain that’s only one level under the TLD…

So it looks like I can’t have my UK domains using CF at the moment?

Best Regards,
Steve

Hi @jamie,
Is there any follow up to this? Is it something you could look into for me as I would like my .co.uk domains on CF too. Do I need to raise a formal ticket somehow?

Still loving VM Pro and the ability to control my CF domains directly from VM :slight_smile:

Cheers,
Steve.

We’re going to release a new Virtualmin shortly that will fix this issue with .uk domains.

Great stuff - thanks!