Wildcard Sub-domain of Sub-domain

dns-hostingdns-zonedomain-name-systeminternal-dns

I have the domain example1.com – DNS managed at Linode.com

There is a site hosted at example1.com (1.1.1.2) and it works fine.

I have an A record for example1.com that points sub.example1.com to 1.1.2.2

I can confirm requests to sub.example1.com resolve to 1.1.2.2, as expected.

I have added sub.example1.com to DigitalOcean and linked to my server.

sub.example1.com loads up my site fine from the server at DigitalOcean.

Now, I have added an A record wildcard * that points to the same 1.1.2.2 (*.sub.example1.com)

I have waited long enough for DNS propagation but pings to random.sub.example1.com are
failing as the host can't be located.

Why can't I add a wildcard for a sub-domain of a sub-domain? Is this even possible?

Best Answer

Something appears to be misconfigured. You are attempting to define a separate DNS zone for your subdomain, but it does not exist on the internet facing DNS servers.

Here is what I see, replacing your domain with example.com.ng:

$ dig +trace accounts.example.com.ng SOA

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> +trace accounts.example.com.ng SOA
;; global options: +cmd
.                       130141  IN      NS      l.root-servers.net.
.                       130141  IN      NS      i.root-servers.net.
.                       130141  IN      NS      d.root-servers.net.
.                       130141  IN      NS      e.root-servers.net.
.                       130141  IN      NS      g.root-servers.net.
.                       130141  IN      NS      j.root-servers.net.
.                       130141  IN      NS      k.root-servers.net.
.                       130141  IN      NS      c.root-servers.net.
.                       130141  IN      NS      m.root-servers.net.
.                       130141  IN      NS      a.root-servers.net.
.                       130141  IN      NS      b.root-servers.net.
.                       130141  IN      NS      f.root-servers.net.
.                       130141  IN      NS      h.root-servers.net.
;; Received 488 bytes from 75.75.75.75#53(75.75.75.75) in 15 ms

ng.                     172800  IN      NS      ns1.nic.net.ng.
ng.                     172800  IN      NS      ns2.nic.net.ng.
ng.                     172800  IN      NS      ns3.nic.net.ng.
ng.                     172800  IN      NS      ns4.nic.net.ng.
ng.                     172800  IN      NS      nsa.nic.net.ng.
;; Received 246 bytes from 128.63.2.53#53(128.63.2.53) in 48 ms

example.com.ng.          21600   IN      NS      ns1.linode.com.
example.com.ng.          21600   IN      NS      ns2.linode.com.
example.com.ng.          21600   IN      NS      ns3.linode.com.
;; Received 104 bytes from 194.0.1.29#53(194.0.1.29) in 81 ms

example.com.ng.          86400   IN      SOA     ns1.linode.com. REDACTED.gmail.com. 2015030476 14400 14400 1209600 86400
;; Received 108 bytes from 65.19.178.10#53(65.19.178.10) in 74 ms

See that SOA record at the end? That isn't the SOA record for your second zone. We can't tell you why this is the case, but until this is corrected none of the changes you make within that second zone file will influence DNS queries.

Related Topic