7

We are creating a web app that will have vanity subdomains such as user1.example.com. 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.*.example.com valid for a wildcard DNS CNAME and would it work as I'd expect?

Thanks!

13

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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