Dynamic DNS

Dynamic DNS can help ensure that DNS queries work even if the web service being sought has recently switched IP addresses.

What is dynamic DNS (DDNS)?

Many web properties, such as APIs or websites, run on internet connections that have their IP addresses changed frequently; this creates a problem if the operators of those properties want to give a hosted resource a specific domain name, which must then store an IP address in Domain Name System (DNS) records. Dynamic DNS (DDNS) is a service that keeps the DNS updated with a web property's correct IP address, even if that IP address is constantly being updated.

For example, if a web administrator is operating a small website with a domain name of www.example.com and an IP address of 192.0.2.0, anytime another user enters www.example.com into their browser, the DNS will direct them to the server at 192.0.2.0. If the admin's ISP dynamically changes the IP to 192.0.2.1, a dynamic DNS service can automatically update the admin's DNS records so that other users trying to visit www.example.com will now go to the correct IP address.

Why do some IP addresses change?

In the early days of the Internet, IP addresses rarely changed, which made management of domains a lot simpler. But the rapid growth of the web and home computers with Internet access created a shortage of available IP addresses. This led to the Dynamic Host Configuration Protocol (DHCP), which lets ISPs assign IPs to their users dynamically. ISPs will typically maintain a shared pool of IP addresses and assign or 'lease' them to users as needed, for the duration of their connection or until a maximum amount of time has been reached. Although the introduction of IPV6 alleviated the IP address shortage, ISPs still often use DHCP because it is more cost-efficient than providing static IPs.

Large enterprises that run major web services require their ISPs to give them unchanging or 'static' IP addresses so they can operate using standard DNS practices. In contrast, smaller services tend to see their IP addresses changed by their ISPs quite frequently, so they require a dynamic DNS solution to keep their DNS records up to date. These smaller services can include small business websites, personal websites, DVRs, and security cameras.

How does dynamic DNS work?

There are a number of companies who offer dynamic DNS services with varying features and technologies. One very common method of enabling dynamic DNS is by providing users with software which runs on their computer or router. This software communicates with the dynamic DNS service provider anytime the IP addresses provided by the ISP is updated, and the dynamic DNS provider in turn updates the DNS with those changes, providing almost instant updates.

How to set up dynamic DNS in Cloudflare

For help setting up dynamic DNS in Cloudflare, refer to Dynamically update DNS records.

FAQs

What is dynamic DNS (DDNS)?

Dynamic DNS is a service that ensures DNS records stay current with a web property's correct IP address, even when that address changes frequently. This is particularly useful for websites or APIs that use service providers that update their IP addresses constantly.

How does the DDNS process work?

Many DDNS providers use software that runs on a router or computer to monitor the connection. Whenever the Internet Service Provider (ISP) updates the IP address, this software notifies the DDNS provider, which then updates the DNS records almost instantly to reflect the change.

Why do IP addresses change for some users?

Most ISPs use the Dynamic Host Configuration Protocol (DHCP) to assign IP addresses from a shared pool, leasing them to users for a set time or for the duration of a connection. This practice addresses the shortage of available IPv4 addresses and remains common today because it is more cost-efficient for ISPs than providing static IPv6 addresses.

Who typically needs a dynamic DNS solution?

While large enterprises often pay for unchanging static IP addresses, smaller services usually receive frequently changing addresses from their ISPs. DDNS is ideal for small business websites, personal sites, DVRs, and security cameras that need to remain accessible under a consistent domain name.

What happens to a website if its IP address changes without DDNS?

Without DDNS, the DNS would continue to direct visitors to the old, inactive IP address. For example, if a site moves from 192.0.2.0 to 192.0.2.1, anyone typing in the domain name would fail to reach the server until the DNS record is manually updated.