Can I use nested DNS wildcard records

Solution 1:

This approach is ok, DNS server use the most specific match which is *.api.example.com for customer.api.example.com The behavior should be consistent because is defined in RFC 1034