Dynamic DNS Explained: Free Setup Guide

Learn how dynamic DNS works, why you need it for home servers and remote access, and how to set it up for free with the best DDNS providers.

dns

Dynamic DNS Explained: Free Setup Guide

Standard DNS maps a domain name to a fixed IP address. This works for servers with static IPs, but most residential and many small business internet connections use dynamic IP addresses that change periodically. Dynamic DNS (DDNS) bridges this gap by automatically updating your DNS record whenever your IP address changes, keeping a hostname pointed at your current address without manual intervention.

How Dynamic DNS Works

The DDNS process involves three components:

  1. A DDNS provider that hosts a DNS record for your hostname (e.g., myserver.ddnsprovider.com).
  2. An update client running on your network that monitors your public IP address.
  3. An update protocol that the client uses to notify the provider when the IP changes.

The update client runs as a background service on a computer, router, or NAS device. It periodically checks your public IP address (typically by querying an external service like checkip.dns.example.com). When it detects a change, it sends an authenticated HTTPS request to the DDNS provider's API, which immediately updates the A (or AAAA) record to reflect the new IP.

The TTL on DDNS records is typically set very low (60-300 seconds) so that resolvers pick up changes quickly. This means that even after an IP change, the hostname resolves to the correct address within minutes.

When You Need Dynamic DNS

Home servers. If you run a web server, game server, media server (Plex, Jellyfin), or NAS at home, DDNS gives you a stable hostname to reach it from outside your network.

Remote access. Accessing your home network via VPN or SSH requires knowing the current IP. DDNS eliminates the need to manually track IP changes.

Self-hosted email. Running a mail server on a residential connection is challenging (and generally not recommended due to IP reputation issues), but if you do, DDNS keeps your MX record current. Use the DNS lookup tool to verify your records update correctly.

IP cameras and IoT devices. Security cameras and IoT devices that need remote access benefit from a stable hostname.

Development and testing. DDNS provides a convenient way to expose local development environments to external services like webhooks.

Free DDNS Providers

Several reputable providers offer free dynamic DNS services. Here are the most established options.

No-IP

No-IP is one of the oldest DDNS providers, operating since 1999. The free tier provides up to three hostnames under No-IP subdomains (e.g., yourname.ddns.net). Free hostnames must be confirmed every 30 days to remain active. Paid plans ($3-4/month) remove the confirmation requirement and allow custom domain names.

No-IP provides update clients for Windows, macOS, and Linux, and is supported natively by most consumer routers.

DuckDNS

DuckDNS is a free, open-source DDNS service that provides subdomains under duckdns.org (e.g., yourname.duckdns.org). There are no limits on the number of subdomains and no periodic confirmation requirement. Authentication uses tokens rather than passwords.

DuckDNS is popular in the home automation community and has installation scripts for Linux (cron-based), Windows, macOS, and various NAS platforms. The service is donation-supported and entirely free.

Dynu

Dynu offers free DDNS with support for both subdomains and custom domain names on the free tier. It supports IPv4 and IPv6, and provides update clients for all major platforms. Dynu also supports wildcard DNS and MX records on free accounts, which is unusual for free DDNS providers.

FreeDNS (afraid.org)

FreeDNS provides free DNS hosting and DDNS with a large pool of shared domains. Users can create subdomains under any shared domain or bring their own. The interface is dated but functional, and the service has been reliable for over two decades.

Cloudflare (with API updates)

If you already use Cloudflare for DNS hosting (which is free), you can implement dynamic DNS by using the Cloudflare API to update your A record when your IP changes. This is not a traditional DDNS service, but it achieves the same result with the performance and reliability of Cloudflare's global network. Community-maintained scripts like cloudflare-ddns and ddclient with Cloudflare support make this straightforward.

Setting Up Dynamic DNS

Step 1: Choose a Provider and Create a Hostname

Sign up with your chosen provider and create a hostname. For this example, we will use DuckDNS:

  1. Go to DuckDNS and sign in with a supported account (Google, GitHub, etc.).
  2. Enter your desired subdomain and click Add domain.
  3. Note your authentication token from the dashboard.

Step 2: Install an Update Client

Linux (cron-based for DuckDNS):

Create an update script:

mkdir -p ~/duckdns
echo 'echo url="https://www.duckdns.org/update?domains=YOURDOMAIN&token=YOURTOKEN&ip=" | curl -k -o ~/duckdns/duck.log -K -' > ~/duckdns/duck.sh
chmod 700 ~/duckdns/duck.sh

Add a cron job to run it every 5 minutes:

crontab -e
# Add this line:
*/5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1

Router-based:

Many routers (Asus, Netgear, TP-Link, DD-WRT, OpenWrt) have built-in DDNS clients. Navigate to your router's DDNS settings, select your provider, and enter your credentials. This is the preferred method because the router is always on and detects IP changes immediately.

Windows/macOS:

Download the official update client from your provider. Install it, enter your credentials, and configure it to run at startup.

Step 3: Configure Port Forwarding

DDNS makes your network reachable by hostname, but you still need port forwarding on your router to direct incoming traffic to the correct device. Forward the relevant ports (e.g., 80/443 for HTTP/HTTPS, 22 for SSH, 25/587 for SMTP) to the internal IP of the device running the service.

Step 4: Verify

After setup, verify that your hostname resolves to your current public IP using the InboxTooling DNS lookup tool. From an external network (e.g., a mobile phone on cellular data), try connecting to your hostname to confirm end-to-end reachability.

Using a Custom Domain with DDNS

Free DDNS services typically assign subdomains under their own domain. If you want to use your own domain (e.g., home.yourdomain.com), you have two options:

  1. CNAME record. Create a CNAME record at your DNS host pointing home.yourdomain.com to your DDNS hostname (e.g., yourname.duckdns.org). This is the simplest approach.
  2. API-based updates. If your DNS host supports API access (Cloudflare, Route 53, Google Cloud DNS), use a DDNS client that updates the A record directly on your domain.

Security Considerations

Exposing services to the internet via DDNS introduces security risks. Follow these practices:

  • Use strong authentication on all exposed services.
  • Enable HTTPS with a certificate from Let's Encrypt (which works with DDNS hostnames).
  • Use a VPN (WireGuard, OpenVPN) instead of exposing individual services where possible.
  • Keep software updated on all devices accessible from the internet.
  • Monitor access logs for unauthorized connection attempts.

Stay on top of your email infrastructure. Sign up for the InboxTooling newsletter for deliverability tips, tool updates, and best practices.