3

Recently Playing around with Digitalocean's DNS service and found a strange issue that doesn't exists of other DNS provider.

When a record with underscore(s) in it, all subsequent update to that zone won't take effect unless that record is removed.

That means the zone file is updated but external dns query will only get answer from previous records.

I can rule out DNS caching causing the problem, since new record will always get a NXDOMAIN and I tried to query the root DNS server of my domain. I even try to query after TTL but the result is the same as the old zone file.

I am curious what kind of problem is it? And in what situation will this happen?

I've question Digitalocean's support but they seems busy and not interested to this question.

So I post the question here hope someone can point me to the answer.

Tony Tsang
  • 33
  • 3

3 Answers3

3

If the problem is with Digitalocean's DNS service only, they're pretty much the only place that can help you. If they refuse to help you (support seems busy), you should look for another service.

3

This is one of the differences between Windows and Unix-based DNS servers. Windows servers consider the underscore as a valid character. Unix-based servers (specifically BIND) does not. For this latter, there is a work-around: create a valid A record (without the underscore) and then create a CNAME (with the underscore) which points to the hostname in the A record. It's a bit of a kluge but it's valuable when dealing with customers who insist on using underscores in hostnames.

joat
  • 186
  • 3
  • Such customers should be gently pointed to [appropriate documentation](https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names), then told to obey the RFCs - or get off the internet. – MadHatter Mar 17 '16 at 20:50
  • joat's answer fixed my underscore problem for a google._domainkey TXT record - running BIND on Windows Server 2008. – Steve Briggs Mar 17 '16 at 20:44
0

Following the recommendation in Digital Ocean, I create a subdomain called domainkey.mydomain.com. Then I can create a CNAME _domainkey.mydomain.com Then you can create s1._domainkey.mydomain.com or s2.domainkey.mydomain.com for Sendgrid.

shakaran
  • 356
  • 1
  • 7
  • 19