Find the answer to your Linux question:
Results 1 to 8 of 8
Hello, my domain has parent nameservers registered with namecheap and its TTL is TTL: 172800 (48hours) my child nameservers TTL is 86400 (24 hours) when i want to migrate my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    325

    TTL change - is required on child nameservers?


    Hello,

    my domain has parent nameservers registered with namecheap and its TTL is TTL: 172800 (48hours)

    my child nameservers TTL is 86400 (24 hours)

    when i want to migrate my website to another hosting (change IP), then is sufficing to change TTL value on parent nameservers? Or i must browse local NS zone files for all domains and change TTL values also there?

    (aim is to decrease caching time so when change of IP happen, visitors ISP will re-read new IP more quickly and serve site from new IP)
    "Avoid the Gates of Hell. Use Linux affordable VPS."

  2. #2
    Linux Newbie
    Join Date
    Jun 2012
    Location
    SF Bay area
    Posts
    173
    First of all, you are on the right track here in terms of preparing to move your domain with minimal confusion. The shorter the TTL for the DNS records the faster cached name to IP mappings will be floating around the Internet. And the faster that cached data ages out, the shorter the window will be where people are hitting both the old and new servers.

    Having said that, I'm not sure what you mean by "parent" and "child" nameservers.

    So here's some info that might help clarify what's important in controlling DNS info.

    The two most important questions to consider are,

    1. What DNS hosts are authoritative for the domain name in question?

    2. For each of those servers, where do they get the "A" records for the zones for which they are authoritative?

    Basically all you need to do is change the TTL in the source data used by all the authoritative DNS servers. Everything else consumes that data either by asking the authoritative DNS servers directly, or by pulling it from another DNS server that cached it from a lookup it did. So it all goes back to the authoritative servers like an inverted pyramid.

  3. #3
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    325
    Quote Originally Posted by cnamejj View Post
    I'm not sure what you mean by "parent" and "child" nameservers.

    So here's some info that might help clarify what's important in controlling DNS info.

    The two most important questions to consider are,

    1. What DNS hosts are authoritative for the domain name in question?

    2. For each of those servers, where do they get the "A" records for the zones for which they are authoritative?
    Hi, example:
    http://www.intodns.com/linuxforums.org

    they mention "parent nameservers" , that probably what you mean by "authoritative nameservers"..?

    These are:
    dns1.ultrahosting.com. ['69.10.224.41'] (NO GLUE) [TTL=86400]
    dns2.ultrahosting.com. ['66.240.151.5'] (NO GLUE) [TTL=86400]

    from whois i see linuxforums.org registar is GoDaddy.com
    So in Godaddy they can register nameservers and set TTL, but in my case i cant set TTL in namecheap (they dont allow this and it is 48 hours set).

    I can only set it on my linux server. Does it mean that TTL that i set on my linux server wont be taken into account? And my visitors will experience maybe 48h downtime (redirection to old hosting with outdated mysql) there are tens of websites so i cant handle any manual edditings, it must be bulk action... ?
    "Avoid the Gates of Hell. Use Linux affordable VPS."

  4. #4
    Linux Newbie
    Join Date
    Jun 2012
    Location
    SF Bay area
    Posts
    173
    IMO the only TTL that matters when migrating say "www.somedomain.com" from one hosting provider to another is the TTL of the DNS records for "www.somedomain.com". Meaning, only the DNS records that tell a browser how to map the webserver domain name to an IP address matter in this context.

    The TTL's for SOA records and other details used when doing a lookup, but not directly related to the mapping of "www.somedomain.com" to an IP addresses can't be ignored in this case.

    So it still comes down to identifying all the DNS hosts that might field lookups for "www.somedomain.com" and making sure their source of info for the DNS records has the TTL you want.

    I run through what I'm talking about using "linuxforums.org" since that's the domain in the link you posted, so you can compare the info...

    Checking the registered DNS servers for the domain with "whois linuxforums.org" I found two were listed,

    Name Server: DNS1.ULTRAHOSTING.COM
    Name Server: DNS2.ULTRAHOSTING.COM
    Doing a lookup for "www.linuxforums.org" against both show something like this:

    $ dig DNS1.ULTRAHOSTING.COM www.linuxforums.org

    ; <<>> DiG 9.8.1-P1 <<>> @DNS1.ULTRAHOSTING.COM www.linuxforums.org
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31634
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 0
    ;; WARNING: recursion requested but not available

    ;; QUESTION SECTION:
    ;www.linuxforums.org. IN A

    ;; ANSWER SECTION:
    www.linuxforums.org. 600 IN CNAME linuxforums.org.
    linuxforums.org. 600 IN A 174.132.123.98

    ;; AUTHORITY SECTION:
    linuxforums.org. 600 IN NS dns1.ultrahosting.com.
    linuxforums.org. 600 IN NS dns2.ultrahosting.com.
    linuxforums.org. 600 IN NS dns3.ultrahosting.com.

    ;; Query time: 76 msec
    ;; SERVER: 69.10.224.41#53(69.10.224.41)
    ;; WHEN: Thu Apr 10 13:09:37 2014
    ;; MSG SIZE rcvd: 140
    which shows there are 3 authoritative DNS servers that need to be checked, namely dns[1-3].ultrahosting.com.

    It also shows that "www.linuxforums.com" is a CNAME for "linuxforums.org" so the DNS entry that really matters is the "A" record for "linuxforums.org". And that entry, at least from DNS1.ULTRAHOSTING.COM has a TTL of 600 seconds.

    So repeating the "dig" command on the other two authoritative nameservers will tell you what the TTL is for the important records for the "www.linuxforums.org" lookup.

    If you want it to be something other than the current value, then you need to change the TTL all three authoritative nameservers use for the appropriate "A" record (or records in some cases).

    How you change the TTL varies depending on the software in use and whatever UI the service provider has put in place to let you manage your info.

  5. #5
    Linux Newbie
    Join Date
    Jun 2012
    Location
    SF Bay area
    Posts
    173
    One minor addition to what I posted above...

    If your users only go to URL's like http://www.[somedomain].com then you just need to worry about the TTL for that one domain name. If you support/allow alternative names for the same site, say http://blog.[somedomain].com, http://www2.[somedomain].com or just http://[somedomain].com then you need to check the TTL for each of them. The important data is the same in each case though, the DNS records mapping the domain name to an IP are all that matter for your purposes.

  6. #6
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    325
    I have this:

    ;; QUESTION SECTION:
    ;ns2.name-server.com. IN A

    ;; ANSWER SECTION:
    ns2.name-server.com. 1199 IN A 1.2.3.4

    ;; Query time: 227 msec
    ;; SERVER: 8.8.8.8#53(8.8.8.
    ;; WHEN: Fri Apr 11 16:43:57 2014
    ;; MSG SIZE rcvd: 62

    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9950
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;www.domain.info. IN A

    ;; ANSWER SECTION:
    www.domain.info. 14399 IN CNAME domain.info.
    domain.info. 14399 IN A 1.2.3.4
    As you can see there are different TTL values..

    The ns2.name-server.com is registered at Namecheap and there i cant change TTL.

    So when i want to migrate my website (domain.info) to another hosting (change IP), i need to change DNS zone file on the target server 1.2.3.4 and set lower TTL value? The high TTL value on parent nameserver (at namecheap does not matter and internet service providers dont cache based on that, they cache based on TTL in zone files)?
    "Avoid the Gates of Hell. Use Linux affordable VPS."

  7. #7
    Linux Newbie
    Join Date
    Jun 2012
    Location
    SF Bay area
    Posts
    173
    Quote Originally Posted by postcd View Post
    I have this:



    As you can see there are different TTL values..

    The ns2.name-server.com is registered at Namecheap and there i cant change TTL.

    So when i want to migrate my website (domain.info) to another hosting (change IP), i need to change DNS zone file on the target server 1.2.3.4 and set lower TTL value? The high TTL value on parent nameserver (at namecheap does not matter and internet service providers dont cache based on that, they cache based on TTL in zone files)?
    You left out the ";; AUTHORITY SECTION:" part of the dig output, and THAT's where you need to make the change. You just need to change the TTL for the "A" record for "www.domain.info" to a lower value. The DNS running on the target server doesn't matter unless the authoritative nameservers (the ones in the "AUTHORITY SECTION:") are doing zone transfers from that server to populate their internal records. Again, I'd be very surprised to hear that's what's going on.

    If you're saying the service hosting the DNS doesn't let you change the TTL's for any of the records in the zone, then you don't have a way to effect the change you want. Only the source of data for the authoritative nameservers matters here.

  8. #8
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    325
    i have nameservers nsx.domain.com registered in namecheap and namecheap says i need to edit DNS zone file on my webserver. So i taken a look into it:



    But i dont see any high A TTL value there (4x 86400 ttls), so you mean which TTL i need to change to increase chance ISPs wont cache old IP long time? thx
    "Avoid the Gates of Hell. Use Linux affordable VPS."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •