Do I need both an A and AAAA record when setting up a wildcard domain?

My server is on Google App Engine standard and I would like to use wildcard domains.

I’m using Cloudflare DNS.

Reading this Cloudflare blog, there is an example of setting an A record:

https://blog.cloudflare.com/wildcard-proxy-for-everyone/

But …

Do I need both an A and AAAA record when setting up a wildcard domain?

Or do I use a CNAME by itself or in combination with either or both of the above?

If the DNS record is proxied, you don’t need to add both A and AAAA records. Cloudflare will proxy IPv6 to IPv4 if there’s only an A record, or IPv4 to IPv6 if there’s only an AAAA record. However, it can be a good idea to add both for redundancy.

That depends on your setup. Does Google App Engine provide static IPs or a CNAME target?

1 Like

For DNS entries that I never intend to un-proxy, I usually only create an AAAA record (or CNAME them to a name that only resolves to an AAAA record), in order to force Cloudflare to connect to my origin over IPV6. If you have proxied A and AAAA records for the same name, Cloudflare will only connect to your origin over IPv4 for some reason (even if your IPv4 connection dies and the IPV6 connection remains up, as far as I know, although I haven’t tested that thoroughly)

For DNS entries that I sometimes grey-cloud (or think I might sometimes need to), I create both so that there’ll be proper connectivity while it’s grey-clouded.

2 Likes

Google’s instructions are to use a CNAME: ‘ghs.googlehosted.com’ for subdomains.
Does that apply to wildcards?

Also, I’ve done some more research and watched this:

Cloudflare Getting Started
Why do they recommend CNAME for subdomains?
Am I confusing recommendations for subdomains with those for wildcards?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.