DNS entries for domain names containing a dash

HCHTech

Well-Known Member
Reaction score
3,848
Location
Pittsburgh, PA - USA
Can anyone tell me what the "formula" is for translating domain names that contain a dash for DNS records? I'm setting up a Microsoft tenant for

domain-name.com

today. I noticed that the MX record to be created (given to me by the setup wizard) is domainname-com01b.mail.protection.outlook.com.

So the "01b" has to be the thing that is standing-in somehow for the dash, but I can't find the rules for this. Further, when I create the noted DKIM CNAME records, as prompted by the wizard in the Defender tenant, they tell me to use

selector1-domainname-com01b._domainkey.domainname.onmicrosoft.com
and
selector2-domainname-com01b._domainkey.domainname.onmicrosoft.com

This all works, of course, but I'm wondering *how* it works. Does anyone know the system?
 
You're connecting dots that aren't to be connected.

the domain-name.com has nothing to do with the subdoman.onmicrosoft.com muck that MS invents when you make a tenant. And it has even less to do with the automatically generated DNS names required for you to reference when you're configuring DKIM.

In this case, it's not about the - at all, that's a valid character in DNS names. It happens to be the ONLY character valid for "spacing" in the DNS spec. But again none of that matters. What matters here is some sort of automation that Microsoft has created to generate the record that handles DKIM. That process is creating that 01b, nothing else.
 
I've had a FQDN for years with hyphens and they work fine for everything, including DKIM. This is a MS thing. They run their own DNS servers so they can do as they please as far address resolution. Many people don't realize but when DNS was getting settled a number of groups were promoting their own DNS system some 25 years ago. I remember playing around with it but nothing ever came of it.
 
Back
Top