We've got about 20 localised domains for just one website, all of them point to the same IP address

The current setup is hosted with Google Cloud DNS and looks like this:

  • example.de. A

    www.example.de. CNAME example.de.

  • example.fr. A

    www.example.fr. CNAME example.fr.

  • example.uk. A

    www.example.uk. CNAME example.uk.

Here's what I want:

  • example.net A

  • example.de. CNAME example.net.

    www.example.de. CNAME example.de.

  • example.fr. CNAME example.net.

    www.example.fr. CNAME example.fr.

  • example.uk. CNAME example.net.

    www.example.uk. CNAME example.uk.

However, according to RFC 1034 (as explained here), I can't have any other entries next to a CNAME. So my question is this: what would you do to make this setup more manageable?

What I'm trying to avoid is having to go through all 20+ domains and edit the IP address in case we migrate to a different server.

Had an idea to CNAME all WWW's to example.net and then redirect naked domains to WWW, but that doesn't seem to be a native DNS feature, and Google Cloud DNS doesn't support Synthetic Records like those in Google Domains

Tried to search but couldn't find anything relevant.


2 Answers 2


What you want to do with CNAME at apex is not possible. You can not have a CNAME record at apex of your zone because a CNAME record can not coexist with anything else at the same label, and at the apex you obviously always have already at least SOA and NS records.

Have a look at this other answer for a lengthy discussion: https://serverfault.com/a/613830/396475

Some DNS hosting companies would provide such feature, by transparently rewriting your CNAME to an A record and sometimes even monitoring if it changes.

I do not know why you absolutely do not want a script. A simple template system would automate 100% of your needs in many cases.

It also depends on which authoritative server you want to use with your zones. Some have various backends, like an SQL database instead of a file, that could help in your case, but for 20 zones it seems disproportionate to me.

You can in fact achieve your goal by having just one file for all your 20 zones. Just define it like that:

 @ IN A
 www IN A

And configure your server to use it for any domain. Then any domain and www prefixed to any domain will all resolve to this IP. No need of CNAMEs and only one file to maintain.

Of course, as soon as you need different records per zone, you are back at initial problem.


I hope that this answer helps you because it helped me.
I have managed 20+ domain names on 5 static IP addresses.
I use NOIP A Dynamic DNS and Managed DNS Provider I downloaded their Dynamic DNS Update Client (DUC) for Windows. Keeping my current 5 static IP addresses in sync with my No-IP host or domain with this Dynamic Update Client (DUC).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.