Is stage.* valid for a wildcard DNS CNAME?

Linkadvitch asked:

We are creating a web app that will have vanity subdomains such as Since we’ll have many subdomains, they need to be dynamic. We want to have a public “stage” area where we can test before going live. The requirement states that all dns names start with stage.

I’m using an AWS load balancer so I have to use a CNAME. Research on google and here tell me that wildcards are supported in DNS CNAME entries (except perhaps when using godaddy) but I haven’t yet convinced myself that you can have a wildcard in the middle of an entry.

Is stage.* valid for a wildcard DNS CNAME and would it work as I’d expect?


My answer:

The wildcard (the *) must be the leftmost part of the domain. So you can’t do stage.*

If you need to do wildcard DNS for this, I suggest using * This may require some minor changes to your deployment processes, but should not be significant.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.