TTL (Time To Live) is a parameter used in computer networks to define how long information remains valid before it must be refreshed or discarded.
When managing websites and domains, you will most commonly encounter TTL values in DNS zone records, where TTL determines how long DNS servers and other systems may cache a record before checking for updates.
At mybox, the default TTL value for DNS records is:
900
seconds (15 minutes).
Table of Contents
How Does TTL Work in DNS?
When a user visits your website, their computer asks a DNS server for information about your domain.
The DNS server responds with the appropriate record, such as:
example.com → 192.0.2.10
Along with the record, the server also provides a TTL value.
For example:
TTL = 900
This tells other DNS servers and devices that they may cache the result for 900 seconds before they need to query the DNS zone again.
Once the TTL expires, the record is retrieved again from the authoritative DNS server.
Why Is TTL Important?
TTL affects how quickly DNS changes become visible across the Internet.
Lower TTL Values
Example:
300
seconds
Advantages:
- DNS changes propagate more quickly.
- Useful before planned migrations or server changes.
Disadvantages:
- Increased number of DNS queries.
- Slightly higher DNS server load.
Higher TTL Values
Example:
86400
seconds (24 hours)
Advantages:
- Reduced DNS traffic.
- Faster DNS responses due to longer caching.
Disadvantages:
- Changes take longer to propagate.
Example
Assume your domain currently points to:
203.0.113.10
with a TTL of:
900
seconds.
If you change the record to:
203.0.113.20
users may continue seeing the old IP address until the cached record expires.
With a TTL of 900 seconds, most users should see the new value within approximately 15 minutes.
TTL in Network Packets
TTL is also used at the network level in IP packets.
In this context, TTL does not represent time in seconds. Instead, it represents the maximum number of network devices (hops) a packet may pass through before it is discarded.
Each router that forwards a packet decreases the TTL value by one.
For example:
TTL = 64
After passing through:
Router 1 → TTL = 63
Router 2 → TTL = 62
Router 3 → TTL = 61
If TTL reaches:
0
the packet is discarded.
Why Is Packet TTL Used?
Packet TTL prevents routing loops.
Without TTL, a misconfigured network could cause packets to circulate indefinitely between routers, consuming bandwidth and network resources.
TTL ensures that packets are eventually discarded if they cannot reach their destination.
Summary
TTL (Time To Live) defines how long data remains valid before it must be refreshed.
In DNS:
- TTL is measured in seconds.
- It determines how long DNS records are cached.
- The default value at mybox is 900 seconds.
In network communication:
- TTL determines the maximum number of hops a packet may travel.
- Each router decreases the value by one.
- Packets reaching a TTL of zero are discarded.
Proper TTL configuration helps balance DNS performance, propagation speed, and network efficiency.