I have a domain name set with wildcard for all subdomain (*.mydomain.com), I need of exclude a specific subdomain from this condition, I use a record dns for set wildcard and if I set a new record A for a specific subdomain it not work
Asked
Active
Viewed 6,638 times
10
-
What DNS server? – Lucas Kauffman Mar 24 '12 at 20:33
-
Possible duplicate of [When I have a \* entry in my zone file, how can I treat a specific name as nonexistent?](http://serverfault.com/questions/586100/when-i-have-a-entry-in-my-zone-file-how-can-i-treat-a-specific-name-as-nonexi) – Jenny D Apr 12 '17 at 07:36
1 Answers
10
Normally when you define a wildcard record, it will only match if no other record matches. So if you have
example.com. A 8.9.10.11
*.example.com. A 4.5.6.7
host1.example.com. A 1.2.3.4
A wild card will only be matched if there is no subdomain defined. If you ask host1.example.com. it should return 1.2.3.4 and not 4.5.6.7
If this is the case, it might be that the changes haven't propagated yet. Use the dig
to query your DNS server and some public server (google's is 8.8.8.8).
Lucas Kauffman
- 16,818
- 9
- 57
- 92
-
I use plesk installed on debian distribution, this is dns zone of the domain name:
*.mydomain.it. CNAME mydomain.it. XXX.XXX.86.76 / 24 PTR mydomain.it. mydomain.it. NS ns.mydomain.it. mydomain.it. NS wordpress.mydomain.it. mydomain.it. A XXX.XXX.86.76 mydomain.it. MX (10) mail.mydomain.it. mydomain.it. TXT v=spf1 +a +mx -all ftp.mydomain.it. CNAME mydomain.it. mail.mydomain.it. A XXX.XXX.86.76 ns.mydomain.it. A XXX.XXX.86.76 wordpress.mydomain.it. A YYY.YYY.187.230
in this example the subdomain wordpress.mydomain.it work on documentroot of main domain and not on YYY.YYY.187.230 – Alessio D'Annibale Mar 25 '12 at 12:14 -
@Alessio Does it return the correct address when you query that name with `dig` or `nslookup`? – Shane Madden Mar 25 '12 at 23:20