By Chris Mingay
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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Solved it myself. Turned out the solution was not to be an impatient moron.
Specific DNS A records always take preference over a wildcard entry
As I understand the RFC (see 2.7 Wildcard records), wildcards should only match records that aren’t defined in the zone file. Is it possible that the DNS records simply hadn’t completely propagated yet?
Yeah that was exactly it. I’ve updated DNS entries in the past and seen the results elsewhere in minutes, but (as every DNS provider will ever tell you) I should allow for a bit longer.
-Chris
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.