Set Up Dynamic DNS (DDNS)

Run a Speed Test

Most home internet connections use a dynamic public IP address that changes periodically — making it impossible to reliably reach your home network by IP. Dynamic DNS solves this by mapping a fixed hostname to your current IP and automatically updating the record whenever it changes.

Why You Need DDNS

When you want to access your home NAS, security cameras, self-hosted server, or VPN from outside your network, you need to know your home's current public IP address. ISPs assign dynamic IPs that can change daily or weekly. DDNS keeps a DNS record pointing to your current IP, updated automatically, so you always connect via a stable hostname like yourhome.duckdns.org.

DDNS works alongside port forwarding — DDNS resolves the hostname to your IP, and port forwarding directs the traffic from that IP to the right device on your local network.

Check for CGNAT First

Before setting up DDNS, verify you have a publicly routable IP address. Some ISPs — particularly mobile carriers and some cable providers — use CGNAT (Carrier-Grade NAT), which means your router's WAN IP is a private address shared with many other customers. DDNS cannot work through CGNAT because you have no control over the outer IP.

Check your router's WAN IP in the admin panel under Status or WAN. If it starts with 100.64–100.127, 10.x, 172.16–31.x, or 192.168.x, you are behind CGNAT. Contact your ISP to request a dedicated public IP, or use Tailscale or ZeroTier, which create peer-to-peer tunnels that do not require a publicly routable IP.

Step 1: Choose a DDNS Provider

Several free and paid providers are well-supported in home routers:

  • Duck DNS — fully free, subdomains under duckdns.org, update via simple URL or Docker container
  • No-IP — free tier with one hostname, requires account confirmation every 30 days; paid tier removes the restriction
  • Cloudflare — free if you own a domain registered with or transferred to Cloudflare; use the API to update your own A record
  • Afraid.org (FreeDNS) — free with subdomains on shared domains; reliable for low-traffic personal use

Duck DNS is the simplest starting point for most home users who do not own a domain. Cloudflare is the best choice if you want a clean hostname on a domain you own.

Step 2: Create Your Hostname

Register at your chosen provider and create a hostname. For Duck DNS, log in with a Google or GitHub account, type a subdomain name, and click Add Domain. Your hostname will be yourname.duckdns.org. Note your token — you will need it for router configuration.

Step 3: Configure DDNS on Your Router

Most modern routers have built-in DDNS clients. The location varies by brand:

  • ASUS: WAN → DDNS
  • TP-Link: Dynamic DNS under Advanced → Network
  • Netgear: Advanced → Advanced Setup → Dynamic DNS
  • Ubiquiti UniFi: Settings → Internet → Dynamic DNS

Select your provider from the dropdown, enter your hostname, username, and password or token. Save and apply. The router will immediately register your current IP and continue updating automatically.

Step 4: Test

From a device on mobile data (not your home Wi-Fi), run ping yourname.duckdns.org. The IP in the response should match your home's current public WAN IP shown in your router's admin panel. If they match, DDNS is working correctly.

Using Cloudflare for a Custom Domain

If you own a domain, point its nameservers to Cloudflare (free plan), then use a DDNS client like ddclient or inadyn running on a Raspberry Pi or NAS to update an A record via the Cloudflare API. This gives you a clean hostname like home.yourdomain.com with no third-party subdomain. Set the Cloudflare proxy to DNS-only (grey cloud) for direct IP resolution.

Provider Free Tier Update Interval Custom Domain Router Built-in Support
Duck DNSYes, unlimited<60 secondsNo (duckdns.org subdomains)Some routers via URL method
No-IP1 hostname, confirm every 30 days1–5 minutesNoMost major brands
CloudflareYes (own domain required)Via ddclient/inadynYesSome via API client
Afraid.orgYes, shared subdomains~5 minutesNoLimited
DynDNSNo (paid only)1–5 minutesYesMost major brands

Related Guides

More From This Section

Frequently Asked Questions

What is DDNS and why do I need it?
Dynamic DNS maps a fixed hostname to your home's current public IP and updates automatically when it changes. Without it, you would need to look up your current IP every time you want remote access.
Does DDNS work if my ISP uses CGNAT?
No. CGNAT places your home behind a shared IP you do not control. Use Tailscale or ZeroTier instead, which create peer-to-peer tunnels that do not require a public IP.
How often does DDNS update when my IP changes?
Most router DDNS clients update within 1–5 minutes of an IP change. Duck DNS can update in under 60 seconds. DNS TTLs are typically set low (60–300 seconds) so changes propagate quickly.
Is Duck DNS free?
Yes, completely free with no feature limits. It provides subdomains under duckdns.org and supports updates via URL, cron job, router built-in, or Docker container.
Can I use DDNS with my own domain name?
Yes. Cloudflare's free plan lets you update an A record on your own domain via API whenever your IP changes. This gives you a clean hostname like home.yourdomain.com.
Do I need port forwarding in addition to DDNS?
Yes. DDNS only resolves your hostname to your current IP. You still need port forwarding to direct incoming traffic on a specific port to the correct device inside your network.