Wildcard DNS like "*-test.example.com"

Is it possible to set up a wildcard domain like "*-test.example.com"?

The main reason I'm asking is because I'm in the process of setting up Continuous Integration with Jenkins, and we'd like to automate the setting up of QA sites to test out specific branches of the codebase.

Say user A is working on a feature in a branch called 'awesome-feature-one', and user B is working on 'boring-code-cleanup'.

What I'd like to have is the DNS setup with something like '*-test.example.com' so that we have domains like 'awesome-feature-one-test.example.com' and 'boring-code-cleanup-test.example.com' without having to set up a DNS record for each and every one.

This way, we don't have to bug our network admin each time we start working on a new feature, it's already set up and we just have to make sure our web server is set up to point them to the proper place -- ie, 'awesome-feature-one-test.example.com' points to the folder /var/www/awesome-feature-one, etc, etc.

Lastly, part of the reason is that these sites use SSL, but our SSL cert is only set up to do wildcard for "*.example.com", so in order to set up wildcard for "*.test.example.com" we'd have to get another SSL cert ( which I may float as a solution if "*-test.example.com" won't work for DNS ).

So, is this possible, or am I looking at a pipe dream?


Solution 1:

No. Wildcards in DNS entries are much more limited and only a wildcard like *.example.com would be possible. See RFC 1034 and RFC 4592.