Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 :

  1. Create a zone in Cpanel for example.com to point to A 192.168.1.199 (random ip)
  2. edit the SOA of example.com and 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?

share|improve this question

closed as off-topic by fuero, Katherine Villyard, Jim B, Ward, Hyppy Apr 29 at 13:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Create a zone for example.com.

In that zone, create appropriate records for example.com and www.example.com.
Then create NS records for *.example.com pointing to the real nameservers.

That should do what you want.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.