By atipugin
My app allows users to use own domains for their profiles. They should be able to delegate their domains to my ns servers (i.e. ns1.mynsdomain.com, ns2.mynsdomain.com).
So i decided to try Bind9 as a DNS server, but can’t figure out how to configure it properly to work with wildcard domains.
Things i did:
zone "." {
type master;
file "db.wild";
};
$TTL 86400
@ IN SOA mynsdomain.com. root.mynsdomain.com. (
100500 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
IN NS ns1.mynsdomain.com.
IN NS ns2.mynsdomain.com.
IN A MY_SERVER_IP_ADDRESS
ns1 IN A MY_SERVER_IP_ADDRESS
ns2 IN A MY_SERVER_IP_ADDRESS
*. IN A MY_SERVER_IP_ADDRESS
Now if i try to ping example.com (which is already delegated to ns1.mynsdomain.com./ns2.mynsdomain.com.), it responds with “cannot resolve example.com: Unknown host”
What’s wrong with my setup?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi,
Remove the A record, and make it a CNAME
*. MYDOMAIN. IN CNAME MYDOMAIN.
Mind the dots at the end of the MYDOMAIN
What do you mean, doesn’t work?
You will need a *. mydomain.com in your virual hosts conf as well.
Or add the subdomains you want to use there.
Wildcard ssl, dns and virtual hosts…
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.