Portal Home > Knowledgebase > Articles Database > Setting up wildcard dns?


Setting up wildcard dns?




Posted by mattie1988, 06-23-2007, 12:02 AM
I am not that much of a dns/server expert, and I really need help setting up wildcard dns for domain names. I have 1 parent domain zone file. Let's name this domain "parentdomain.com". Now this domain is set up with private nameservers of ns1.parentdomain.com and ns2.parentdomain.com and everything works fine. What I want to do is now have the ability to put ns1.parentdomain.com and ns2.parentdomain.com into any other domain on the web and make it forward to this Parentdomain.com web root. How do I do this WITHOUT adding a zone file for each of these individual child domains? The thing is that I have a project where I don't know which domains will have nameservers set to ns1/ns2.parentdomain.com, but I want them all to forward to the appropriate directory. Please help!

Posted by AGNWS, 06-23-2007, 12:42 AM
Just edit the DNS zone for the domain and put *.domain.tld. Also most of the time you will need to add support to your webserver to pickup the wildcard calls.

Posted by mattie1988, 06-23-2007, 12:49 AM
But I am not trying to resolve wildcard subdomains. I am trying to resolve wildcard Domains. So what I'd need is *.tld. And I don't know how to do it.

Posted by SparkJim, 06-23-2007, 02:15 AM
Add a Zone for "com" ( as if it was an ordinary domain ) domain. Then add an "A" record for "*" as a subdomain entry as shown below in the zone db. That will take care of it -- * IN A abc.def.ghi.jkl --

Posted by mattie1988, 06-23-2007, 11:38 AM
Hey SparkJim, thanks for the help thus far - but I am not understanding on how to do some of this. So far I have two zones, my parentdomain and one that is called "com". Now if I'm correct, I have to create a New Host (A) file? I did that and for the name I put "*" and for the ip address, I set my server ip and I leave the Create Assosciated Pointer Record unchecked, right? So this is how my New Host A record looks like: Name: * Fully qualified domain name: *.com. IP address: {ip address of the server} What should I do next?

Posted by mattie1988, 06-23-2007, 11:39 AM
Actually, after what I did above, it works to some degree. Now when I go to a domain that has the nameservers set to my parentdomain, it shows the following text: "Bad Request (Invalid Hostname)" But not sure how to resolve this to an actual path on the server...

Posted by mattie1988, 06-23-2007, 12:16 PM
Got it to work! I had to add a new blank host header under my parent domain, and cha-ching. =) Appreciate the help!!!

Posted by SparkJim, 06-23-2007, 02:06 PM
Good to hear that you got it working



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
15minuteservers down? (Views: 697)

Language: