-1

I have a domain xyz.com on (xx.xxx.255.25) and sub.xyz.com on (xx.xxx.255.240)
To resolve sub I added the following reocrd in BIND

sub IN A xx.xxx.255.240
*.sub IN A xx.xxx.255.240


and worked well, but the problem is with the sub of subdomain it did not resolve.
I tried adding a test sub and worked well:

test.sub IN A xx.xxx.255.240

The point of the wildcard (*) is that I have multiple subs (FTP, mail, SMTP...)
So where exactly I did wrong caused the sub of the subdomain to not resolve?

[UPDATE]

Resolving sub of subdomains worked as *@Tommiie* said, but the second problem appeared is with `TXT` records (SPF, DKIM, DMARC), Can I add wildacrd as `A records` to resolve them?
Ahmad
  • 113
  • 6
  • 3
    Normally bind is configured to allow shorthand and unqualified resource records (those whose name does not end in a `.` dot) get appended with the zone name. A record `host` in the `example.com.` zone file will have the name of the zone appended and be processed as `host.example.com.` Your question mentions record `sub.` with a trailing dot. Those are FQDN’s and won’t have the zone name appended. – Bob Nov 25 '20 at 13:05
  • even after removing the dot at the end I still have the same issue. – Ahmad Nov 25 '20 at 13:08

1 Answers1

3

Do you have other records in the sub subdomain?

The wildcard character matches any number of labels in a name as long as there isn't an exact match with a name already in the name server's database.

Quote from DNS & BIND (5th edition), p. 488

As you also want TXT wildcard records:

*.sub.example.com.  A     xx.xxx.255.240
*.sub.example.com.  TXT   "spv record"
*.sub.example.com.  TXT   "dkim record"
*.sub.example.com.  TXT   "more text records"

Please share a more complete configuration.

PS: remove the trailing dots. It wont work with them in place.

Tommiie
  • 5,547
  • 2
  • 11
  • 45