We have a wildcard set up to handle all subdomains for "example.com"
A RECORD: *.example.com points to 10.10.10.10
We have a more specific A record to handle a special subdomain (this works fine):
A Record: staging.example.com points 10.10.10.9
The problem we're having is we're migrating staging to a new hosting environment and we've been instructed to use a CNAME:
CNAME: new-staging.example.com points to proxy.heroku.com
We thought this would work. However, new-staging.example.com resolves to the top-level wildcard 10.10.10.10 and doesn't point to proxy.heroku.com.
What am I missing? Is this not possible? Or is this bad practice? Thanks,
Best Answer
The answer is generally "No" - the more specific record should win, so this should work as you described/expected. My guess is you have the wildcard A record cached somewhere, and need to wait for that cache to expire.
a quick test with BIND 9.6.2-P2/FreeBSD 8.1:
A zone containing the records:
Resolves as follows:
(Returns the CNAME)
and
(Returns the wildcard A record)