Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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