Wildcard certificates for domains

Turns out that if you have a wildcard certificate you want to install in a website, you can't set your DNS to be two levels. You can use the certificate for api.example.com, but not dev.api.example.com!

h/t StackOverflow