Subdomains.

ramirez

Verified User
Joined
Mar 10, 2004
Messages
19
EDIT. This is weird, it works for my friend who lives on US, but not for me (I live in Finland), but the actual domain and most of the subdomains (such as ftp, pop, mail, nameservers and my hostname for server does resolve).
I keep getting the "Unknown host" error.
**

I was just wondering how long does it take to update the DNS settings after I've added a subdomain (either via the subdomain adder, or manually from the DNS settings).
I tried manually restarting the named and after that I rebooted the whole server without any results, and I am just wondering if there's some delayment for it to affect (it was instant with my old host, so).
Thanks in advance.
 
Last edited:
Technically when you add a brand new record it does not need time to propergate. That only affects TDL's and existing cached domains. The only issue you can get is if you use Slave DNS servers, those won't be able to answer for the subdomain till it grabs the next update.
 
existenz said:
Technically when you add a brand new record it does not need time to propergate. That only affects TDL's and existing cached domains. The only issue you can get is if you use Slave DNS servers, those won't be able to answer for the subdomain till it grabs the next update.
Excuse me if the following question sounds stupid, I am kind of new with this stuff.
I am not sure what slave DNS is, but I'd assume that slave DNS server is the secondary DNS server.
When I used my domain registrant' nameservers and I edited the DNS records (added subdomains) it worked instantly, but I obviously wanted my own nameservers, so I bought an extra IP and registered ns1 and ns2 nameservers for my domain and set them up in Direct Admin.
So it shouldn't take time to propergate I guess, but it does, so I'd like to know if there is anything I can do to make it not to wait?
Thanks for help, I appreciate it. :)
 
ramirez said:
I am not sure what slave DNS is, but I'd assume that slave DNS server is the secondary DNS server.
There's no such thing as a secondary DNS server. In fact there's no such thing as a master DNS server, a primary DNS server, or a slave DNS server.

All DNS servers can host both master and slave DNS zones.

A master DNS zone is the zone for a domain name that you control by changing the zone file yourself. You do that on DA through the DNS part of the control panel.

A slave DNS zone updates itself by getting the information from the master DNS zone. It does that by itself after you set up slave DNS information in the named.conf file. DA does not yet support setting up slave DNS zones.

When you use two IP#s on a DA server to host DNS what you're really doing is just that; you're pointing two IP#s to one nameserver, which is hosting master DNS for all the domains on it. This fools the DNS system, but it doesn't give you the real redundancy the system was designed to have.
When I used my domain registrant' nameservers and I edited the DNS records (added subdomains) it worked instantly, but I obviously wanted my own nameservers, so I bought an extra IP and registered ns1 and ns2 nameservers for my domain and set them up in Direct Admin.
Since you don't tell us the names you registered there's no way for us to check to see if they work or not.
So it shouldn't take time to propergate I guess, but it does, so I'd like to know if there is anything I can do to make it not to wait?
New nameservers have to be registered with the Internet root servers; that generally only happens twice a day for most top-level domain registries, once a day for some.

If you've tried to find your domain before the new nameservers are added, the nameserver you use for DNS resolution (typically your ISP's nameservers) will cache what's called negative information, so they won't even check again for 72 hours. That's why we talk about "up to 72 hours to propagate".

Jeff
 
ramirez said:
So it shouldn't take time to propergate I guess, but it does, so I'd like to know if there is anything I can do to make it not to wait?
Thanks for help, I appreciate it. :)

It should not take much time at all. If this is a new subdomain it would be almost instant if you have a existing subdomain and are just changing the ip address it could take however long it takes to propagates out.
 
So, I have to edit named.conf myself, since DA doesn't support setting up slave nameservers?
Ok, that's not a problem, I'll look into it tomorrow.
However, what I meant is that, everytime I add a new subdomain (via DA), it doesn't instantly activate, as it did with my other nameservers I used before my own, I tried restarting Apache and Named.
Thanks again.
 
ramirez said:
So, I have to edit named.conf myself, since DA doesn't support setting up slave nameservers?
See my previous post to this thread; there's no such thing as a slave nameserver.

All the sites on your DA box should have master zones set up by DA. The only reason you'd want to create slave zones would be if you were going to use it to slave zones with master records hosted elsewhere. Is that what you want to do? If so, then you'll need to create named.conf records and new zone files manually.

If you're using two IP#s on your DA system in an attempt to "fool" DNS into thinking you have two nameservers when in fact you only have one you do NOT create slave zones anywhere. You just have the two IP#s answering on the same server. To make sure they both answer you can ping both IP#s, or you can do an nslookup or a dig on a specific server from outside your datacenter network.

Otherwise, no you don't have to do any editing of either named.conf or the zone files.

What you have to do is tell DA what the IP# is of ns1.yourdomain.com and of ns2.yourdomain.com. The IP# for ns2.yourdomain.com does NOT have to be on your server, but can be for another server, anywhere, or for a commercial service such as the one we offer.

Then you create slave zones on the machine corresponding to the second IP#. You do it by making changes to named.conf on THAT system.

The only reason you'd have to edit your DA-based named.conf file would be if you've got any allow-transfer directives; if so you'll have to make sure they specifically allow the IP# of the ns2 system to get zone-file transfers.

You can even automate the creation of zones on the server running as ns2, but that's done completely outside of Bind.
However, what I meant is that, everytime I add a new subdomain (via DA), it doesn't instantly activate,
What do you mean by "it"? Do you mean your master DNS, controlled by DA, doesn't work, or that it doesn't create slave DNS automatically?
as it did with my other nameservers I used before my own,
Your prior DNS provider may have had some other method, perhaps transparent to you, to creating slave DNS records, or even multiple master records, on multiple servers.
I tried restarting Apache and Named.
Restarting the named daemon is always necessary after making manual changes; you don't have to do it after making changes through the control panel, as DA does it for you.
When editing master zone files you should always update the serial numbers before restarted the daemon. You should never edit slave zone files; they're managed by the named daemon.
Thanks again.
You're welcome. DNS is a very important part of the Internet; it's the "glue" that holds it all together. If you don't understand it, then you really shouldn't mess with it. Either use it by default, as it was designed to be used, hire a consultant to set up exactly what you want and possibly create a templating system so you can add more records later, or learn it yourself. I highly recommend "Linux DNS Server Administration", published by Sybex, or "DNS and Bind" published by O'Reilly, for good background experience in DNS.

Jeff
 
Thanks, that helped a lot. :)
quote:
--------------------------------------------------------------------------------
However, what I meant is that, everytime I add a new subdomain (via DA), it doesn't instantly activate,
--------------------------------------------------------------------------------


What do you mean by "it"? Do you mean your master DNS, controlled by DA, doesn't work, or that it doesn't create slave DNS automatically?

What I meant by it, is the subdomain I just added.
For instance, if I add a subdomain named 'test' for my domain, it doesn't instantly work (only after the DNS has updated, which is once or twice a day I think).
I was just asking is it somehow possible to make it work/activate as soon as I add it (like with my old host).
I am not sure how to achieve this, or is it even possible for me to do.
It doesn't matter that much, but afterall I *am* impatient, hehe. :)
 
After DNS is updated by whom?

If you're authoritative for the domain, then there should be no delay at all when setting up a subdomain.

Are you just allowing DirectAdmin to set up the subdomain's DNS or are you doing something else yourself? Specifically is there an A record for the subdomain and for www.subdomain in the main domain DNS zone as well as a complete zone for the subdomain?

The problem could also be in your local system; if you check a subdomain before you've set up DNS for it, something called "negative cacheing" takes effect at the nameserver your local provider uses, and that has to clear before your local provider nameserver will again check the authoritative nameserver for the domain.

Jeff
 
jlasman said:
After DNS is updated by whom?

If you're authoritative for the domain, then there should be no delay at all when setting up a subdomain.

Are you just allowing DirectAdmin to set up the subdomain's DNS or are you doing something else yourself? Specifically is there an A record for the subdomain and for www.subdomain in the main domain DNS zone as well as a complete zone for the subdomain?

The problem could also be in your local system; if you check a subdomain before you've set up DNS for it, something called "negative cacheing" takes effect at the nameserver your local provider uses, and that has to clear before your local provider nameserver will again check the authoritative nameserver for the domain.

Jeff
Thanks for quick answer.
That also answered my question perfectly.
It was because of the "negative cacheing".
I didn't try the subdomains before setting them though, but it seems that I had to restart named (and apache to set the correct document root) before the subdomains took effect (I thought that DA would do this for you).
Thanks.
 
DirectAdmin should be restarting apache; I'll pass this on to DA support as a possible bug if I can replicate it.

As far as setting the correct document root, well if the default isn't what you want you'll always have to do that :) .

One of the things I like most about DA is that we can make these changes without them being overwritten when we least expect.

Jeff
 
jlasman said:
DirectAdmin should be restarting apache; I'll pass this on to DA support as a possible bug if I can replicate it.

As far as setting the correct document root, well if the default isn't what you want you'll always have to do that :) .

One of the things I like most about DA is that we can make these changes without them being overwritten when we least expect.

Jeff
Well, actually, you have to restart both Apache and Named.
If you only restart Apache, the subdomain still doesn't work (at least for me).
If you only restart named, it works, but it doesn't use the correct document root directory (as Apache still uses old httpd.conf).
If you restart both, it works like it should.
Thanks again, you were a great help. :)
 
John has responded to me that he's looking into the issue, that he believes DA should be restarting everything it needs to restart.

Jeff
 
There's no such thing as a secondary DNS server. In fact there's no such thing as a master DNS server, a primary DNS server, or a slave DNS server.

All DNS servers can host both master and slave DNS zones.

Not to make this confusing for anyone who reads this in the future their really is no such thing as primary or secondary name server though the term if very popular and used to describe master or slave zone.

primary = master
secondary = slave

So don't freak out they still exist :p
 
Back
Top