Accept domains with nameservers set...

citricsquid

Verified User
Joined
Mar 8, 2009
Messages
8
Hi,
Is it possible to accept any domain that has the servers nameservers attached?

For example "ns1.example.com" and "ns2.example.com", if I apply these to my domain and don't add any sort of entry for the domain then it doesn't resolve, however if I add an entry it does.

Is it possible to have any domain that has the servers nameservers resolve to a specified location? So if I add the domain "google.com" to the server as an account, it's created, if I then add the servers nameservers to "yahoo.com" and don't add an account, is it possible to have this domain resolve to a location of my choosing?

If not; how can I add domains to the addon domains section through PHP, api for me to use?
 
If by "apply nameservers to a domain" you mean "set the nameservers for a domain at the registrar", it would be a little difficult to automatically add a zone into your nameserver whenever you do that... because the registrar fills two databases (whois database and official TLD nameservers) with the records stating "domain -> nameservers", but there is no databases for "nameservers -> domain".

If you don't understand a word of what I'm saying I will explain better, just don't have the time right now :) sorry.
 
I think I understand.

A domain has nameservers attached, these reference to a server. The DNS servers store the domain name and the name servers, when you enter a domain name your browser connects to your ISPs servers which then query the database for the nameservers and connect you to the server, the server then checks if there is an entry for the domain and does whatever is required.

I'm assuming my 'problem' is possible to solve, do companies like sedo really add a new entry for EVERY domain? Surely you can have a wildcard set up for this sort of thing.
 
What you said is not completely right, but you are close enough: nameservers use ISC BIND and a few other alternatives, with different DBs backend, but all of them must be configured with a zone for every domain. There is not "automatic zone configuration" because that's not how the DNS system works.

Of course if a registrar also manages the nameservers for the given domain (like, for example, you register a domain with GoDaddy and you use their nameservers for your domain) they simply have a routine that 1) fills the whois database 2) adds the NS records to the TLD nameservers 3) adds the zone to the domain nameservers.
But if you want to use your own nameservers point 3 must be done manually. There is no way to retrieve all domains with your nameservers as NS records from the TLD nameservers.

It's the way it works, it's always been like that.
If you want to do it automatically you will have to become a certified ICANN registrar and either have modification access to the official Whois and TLD nameservers or have your own, in order to fill automatically the domain nameservers. That's what big hosting companies do.
 
I think you've misunderstood what I want.

If I have:
1 Server
1 Main Domain name (example.com)
100,000 other domains

I create the nameservers for my server: ns1.example.com and ns2.example.com, I had an entry for "example.com" in my server so when you go to example.com it loads up the webpage for that domain.

I then take my 100,000 other domains and give them the nameservers "ns1.example.com" and "ns2.example.com", which match my server.

What I want is when you go to ANY of the 100,000 domains the server checks if the domain exists as an account, if it doesn't and there is no entry for it in the server it redirects to a single account. So I'm basically wondering how can I do wildcard subdomains, with full domains.

So if one of the 100,000 is google.com and I've not created an account or DNS entry for the domain, but it does have ns1.example.com and ns2.example as it's nameservers, how can I make it resolve to a specified location?

Possible?
 
Well, that's quite simple.
You just add every domain only as a DNS zone (not as a domain of a user), with A records pointing to your server.
Apache will use the default VirtualHost for that IP if there is no specific VirtualHost, so all domains that are not added (and therefore don't have a VirtualHost) will be shown as that default VirtualHost, where you will put your "generic" page.

Next time you want to do something ask directly what behaviour you are looking for. This has nothing to do with nameservers, that's what confused me :)
 
Well, that's quite simple.
You just add every domain only as a DNS zone (not as a domain of a user), with A records pointing to your server.
Apache will use the default VirtualHost for that IP if there is no specific VirtualHost, so all domains that are not added (and therefore don't have a VirtualHost) will be shown as that default VirtualHost, where you will put your "generic" page.

Next time you want to do something ask directly what behaviour you are looking for. This has nothing to do with nameservers, that's what confused me :)

I assumed:

For example "ns1.example.com" and "ns2.example.com", if I apply these to my domain and don't add any sort of entry for the domain then it doesn't resolve, however if I add an entry it does.

Is it possible to have any domain that has the servers nameservers resolve to a specified location? So if I add the domain "google.com" to the server as an account, it's created, if I then add the servers nameservers to "yahoo.com" and don't add an account, is it possible to have this domain resolve to a location of my choosing?

was clear enough, I apologise if it wasn't :)

thanks for the help
 
Back
Top