A self-hosted website behind a residential internet connection has a dependency that a typical cloud-hosted site does not: the public IPv4 address of the router may change. A fixed domain name can continue to point at the old address, even when WordPress and the Raspberry Pi are working normally.
In my original Raspberry Pi WordPress installation guide, I used No-IP to explain dynamic DNS. This follow-up covers the equivalent approach for a domain using Namecheap DNS and the Linux ddclient service. It is based on my earlier deployment notes, with the record types, encryption and service checks reviewed against the provider and ddclient documentation in December 2026.
Scope: The commands below are a reusable example, not an export of my live DNS credentials or private network settings. I have not deliberately changed the production website’s IP address to test this guide. Do not replace the configuration of an already working site without recording its existing DNS records and service settings first.
1. What dynamic DNS actually solves
DNS resolves a hostname to an address. Dynamic DNS automates updates to that mapping when a public address changes. ddclient checks the public address and updates the configured DNS records when appropriate. It does not install WordPress, provide HTTPS certificates, open a router firewall or create a public address.
- A domain whose authoritative DNS supports Namecheap’s Dynamic DNS service (BasicDNS, PremiumDNS or FreeDNS).
- An always-on Linux system, such as a Raspberry Pi running Ubuntu Server.
- A reachable public IPv4 address and a correctly configured web server if you intend to host a public website.
- Administrator access to the domain and Linux service. Keep a separate recovery path before making DNS or networking changes.
If your ISP uses carrier-grade NAT, changing DNS alone will not make an inbound connection reachable. Compare the router’s WAN address with a public IP check. Resolve that connectivity issue before changing records. Also avoid exposing SSH, NAS shares or database ports publicly just to run a website.
2. Configure only the DNS hosts that need updating
In Namecheap, locate the domain’s Advanced DNS settings. Enable Dynamic DNS and record the separate Dynamic DNS password securely. Use A+Dynamic DNS Record, rather than an ordinary A record, for each IPv4 hostname that ddclient should maintain. For a bare domain, use @; for a separate www host, use www. If www already uses a CNAME pointing to the bare domain, it does not need an independent dynamic update.
| Host | Example configuration |
|---|---|
| @ | A+Dynamic DNS Record; preserve the currently correct IPv4 value during migration |
| www | Either its own A+Dynamic DNS record or an existing CNAME to the bare domain, not both |
Do not replace MX, TXT or unrelated records. Check for conflicting records and any stale AAAA records: Namecheap’s Dynamic DNS feature updates IPv4, not IPv6. An unreachable IPv6 address can cause failures even while IPv4 works. See Namecheap’s host-record instructions.
3. Install ddclient and identify the actual configuration path
sudo apt update
sudo apt install ddclient
systemctl cat ddclient
sudo systemctl status ddclient --no-pager
The installation may present a configuration wizard. Package versions and distributions differ: inspect the systemd service and its configuration rather than assume every installation uses the same defaults file. Older Debian/Ubuntu packaging commonly uses /etc/ddclient.conf; current upstream documentation also describes /etc/ddclient/ddclient.conf. Back up the existing file locally, preserving restrictive permissions, before editing.
4. Example configuration
For a dedicated Namecheap configuration using the conventional ddclient syntax, the following illustrates an apex and independent www update. Replace example.com and the credential placeholder with your own values in the actual configuration file. If www is a CNAME, remove its line. If other providers or domains are already configured, merge the new block carefully rather than replacing their settings.
daemon=300
syslog=yes
ssl=yes
use=web, web=dynamicdns.park-your-domain.com/getip
protocol=namecheap
server=dynamicdns.park-your-domain.com
login=example.com
password='YOUR_DYNAMIC_DNS_PASSWORD'
@
www
The example follows Namecheap’s ddclient guidance and includes encrypted updates. Verify support for the syntax and HTTPS behavior in your installed version. Use the provider’s generated Dynamic DNS password, not the password for your Namecheap account. Store it only in the service configuration or another supported secret mechanism. Restrict access to the configuration file to the service account and administrators; do not paste real credentials into terminal screenshots, chat messages or a public repository.
5. Run and inspect the service
sudo systemctl enable --now ddclient
sudo systemctl restart ddclient
sudo systemctl status ddclient --no-pager
sudo journalctl -u ddclient -n 30 --no-pager
Check the locally installed service’s startup behavior and whether the intended hosts update successfully. A no-change result can be normal when the public address remains the same. If the service is configured as a timer or one-shot job, follow that package’s service instructions rather than forcing daemon mode. Do not repeatedly force updates just to produce a success message.
6. Verify DNS separately from website availability
Use your own domain in these checks. The public-address command contacts an external IP-check service. DNS answers can remain cached until their TTL expires.
curl -4fsS --max-time 15 https://dynamicdns.park-your-domain.com/getip
# Replace the documentation domain with your own.
dig +short A example.com @1.1.1.1
dig +short A www.example.com @1.1.1.1
# Inspect the final response and redirect destination.
curl -sSL --max-time 20 -o /dev/null \
-w 'HTTP %{http_code} | Final: %{url_effective}\n' \
https://example.com/
Install the distribution’s DNS utilities package if dig is not already available. Finally, test the public website from a separate network such as a phone using mobile data. A test from the same LAN can behave differently because some routers handle connections to their own public address differently.
7. Lessons from operating this website
The domain and server checks performed on this site on 4 December 2026 confirmed that all four ordinary HTTP/HTTPS and www/non-www variants reach the same canonical HTTPS homepage. The selected blog articles returned HTTP 200. That establishes routing at the time of the check, not a historical record of successful dynamic updates.
| Symptom | What to check first |
|---|---|
| DNS returns an old address | DDNS service logs, host record type, cache and TTL |
| DNS is correct but HTTP fails | Public IP reachability, router configuration and web server |
| HTTP works but HTTPS fails | TLS certificate and HTTPS virtual host |
| www behaves differently | www record and canonical redirect |
| Intermittent access | IPv4/IPv6 reachability, service status and DNS cache |
Dynamic DNS is one small part of reliable self-hosting. Keep the domain and HTTPS setup documented, avoid accidental exposure of private services and monitor the website from outside the LAN. If a change fails, stop the updater and restore the saved working DNS records and configuration before trying another approach.
For the hardware and web stack, see Part 1, Part 2 and the measured operational follow-up. Additional configuration reference: ddclient documentation.
Editorial note: adapted from the author’s unpublished technical notes with AI-assisted editing and reference verification. The examples are illustrative and were not rerun against the production DNS account for this article.
