Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I changed name server of one domain.

Then I flush dns

root@host [~]# /etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
root@host [~]# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=53 time=36.0 ms
64 bytes from icmp_seq=2 ttl=53 time=36.7 ms
64 bytes from icmp_seq=3 ttl=53 time=35.9 ms
64 bytes from icmp_seq=4 ttl=53 time=35.9 ms

Well, ping still points to the old server.


share|improve this question
Pretty sure it takes time (up to a few hours) for a DNS change to propagate to all DNS servers, and there's nothing you can do about it. – Kevin Feb 16 '13 at 17:16

2 Answers 2

If you have nscd running, you have to flush its name-resolver-cache as well: nscd -i hosts. Apart from that a named-restart will not do much.

Is this a primary DNS-server? Then the generation-number has to be raised after you changed the contents of a zone.

A secondary DNS-server? Then you might force to reload the corresponding zones before the TTL expires.

share|improve this answer

You first need to understand Time to Live ( TTL ) in DNS


TTL is an acronym for Time To Live and refers to the capability of the DNS servers to cache DNS records. It represents the amount of time that a DNS record for a certain host remains in the cache memory of a DNS server after the latter has located the host's matching IP address.

If your DNS is cached by your ISP DNS server or Public DNS Server then you can to wait as per TTL values. If you restart the local DNS Server then it will not affect because it's taking the answer from another DNS server.

If you want to override that urgently then then you can add those entry in /etc/hosts file and run rndc flushname .

You don't need to restart the whole DNS server, it will flush all other sites from memory, and it will increase load on your server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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