Question
DNS Zone file wildcard preference
I manage my DNS settings for a domain through digital ocean. I have the following entries.
apple.example.com 1.1.1.1
orange.example.com 1.1.1.1
*.example.com 2.2.2.2
So all subdomains route to 2.2.2.2 unless I specify a specific DNS entry.
I decide to add another subdomain
pear.example.com 1.1.1.1
I try pinging pear.example.com and it still resolves to 2.2.2.2
In my Zone file * is listed above pear
apple IN A 1.1.1.1
orange IN A 1.1.1.1
* IN A 2.2.2.2
pear IN A 1.1.1.1
which makes me wonder if the DNS check is matching * before it even gets a chance to see pear? For another domain, I deleted the * entry and then added it back to the end of the list and it solved my issue, but that seems a bit of a bodge to me?
Am I doing anything wrong?
Ta
Chris
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×