I'm using my DNS server to block certain sites. However, I ran into a problem.
Let's say there are the following domains:
- www.example.com
- example.com
- john.example.com
- bob.example.com
- mary.example.com
- katie.example.com
- ...
However, I only want to block www.example.com and example.com by pointing their DNS entries to an invalid IP. All other subdomains should remain intact. However, the problem arises when I add example.com as a zone. Once I did that, all subdomains belong to example.com become "non-existent domain" when I use nslookup. Blocking www.example.com does not create any problem.
Is there any way to create an entry for example.com and still let its subdomains use other authoritative nameservers?
Update
I tried what @MikeyB suggested, but nslookup still gives me "non-existent domain".
What I did :
- Create a zone in Cpanel for
example.comto point toA 192.168.1.199(random ip) - edit the SOA of
example.comand point it to the real nameserver
I was not able to create NS record *.example.com pointing to the real nameservers.
Cpanel gives me the error message of
"invalid NS owner name (wildcard)"
Do I need to add a new zone for *example.com? If yes, what IP should I be pointing it to since it's a wildcard domain? Do I point it to the IP of www.example.com?