Skip to main content
miji.be

TTL

Time to Live - a value that specifies how long data should be cached or considered valid before being refreshed.

May 1, 2026 / About 1 min read

Redirect

TTL (Time to Live) is a value that determines how long a piece of data remains valid before it should be refreshed or discarded. In web technology, TTL appears in multiple contexts: DNS records have TTL values that control how long resolvers cache the record, HTTP cache headers use max-age to specify content freshness, and CDN configurations use TTL to determine how long edge servers cache content.

In DNS, TTL is measured in seconds and tells resolvers how long to cache a DNS response before querying the authoritative server again. A TTL of 3600 means the record is cached for one hour. Lower TTL values enable faster propagation of DNS changes but increase query load on authoritative servers.

For URL shortening services, TTL is relevant in several areas. DNS TTL affects how quickly custom domain changes propagate. CDN TTL determines how long cached redirect responses are served from edge servers. Database TTL can be used to automatically expire short URLs after a specified period.

Choosing appropriate TTL values involves balancing freshness against performance. Short TTLs ensure changes propagate quickly but increase origin server load. Long TTLs reduce server load but delay the propagation of updates.

Was this article helpful?

Related Terms

DNS Resolution

The process of translating a human-readable domain name into the IP address of the server hosting the website.

Link Expiration

Link expiration is a feature that automatically disables a short URL after a set time period or number of clicks. Used for time-sensitive campaigns, security, and content access control.

CNAME Record

A CNAME record maps one domain name to another in DNS. Used to point custom branded short URL domains to the URL shortening service infrastructure without changing IP addresses directly.

Redirect Caching

A mechanism in which browsers and CDNs store redirect responses for a certain period and skip querying the origin server on later visits.

Client-Side Redirect

A redirect executed by the browser using HTML meta tags or JavaScript, after the initial page has been partially loaded.

Redirect Latency

The delay incurred during a shortened URL's redirect process. A critical performance metric that directly affects user experience and conversion rates.

Related Articles

URL Expiration Best Practices: Security vs Convenience

An explanation of how to optimize the expiration of short URLs by use case. It covers the recommended period for each situation, such as campaigns, events, and internal sharing, and the security measures to take after expiration.

301 vs 302 Redirects - Choosing the Right Type for Short URLs

Understand the differences between 301 and 302 HTTP redirects. Learn how each type affects SEO, analytics, and performance for short URLs.

How URL Shorteners Work - The Technical Side of Redirects

Discover the technical mechanics behind URL shortening: hash generation, database lookups, HTTP redirects, and more. Includes HTTP response examples and base-62 encoding calculations.

FAQ

How should TTL values be configured?
Use short TTLs (300–3,600 seconds) for frequently changing records and long TTLs (86,400 seconds or more) for stable records. Lower the TTL before a DNS migration so changes propagate quickly.
What problems can a TTL that's too short cause?
It increases DNS query frequency, leading to higher name resolution latency and greater server load. A TTL of at least 3,600 seconds (1 hour) is recommended for normal operations.

Put the terms to work

Shorten a URL for Free