Dynamic DNS (DDNS) is essential if you’re hosting services from home (self-hosted) where your IP address changes periodically. Namecheap (as well as others) offers a straightforward DDNS service for their domains that allow you to programmatically update the DNS. Here’s how to set it up.
Step 1: Enable Dynamic DNS (NameCheap)
- Log into your Namecheap account
- Go to the Domain List and select “Manage” next to your domain
- Navigate to the “Advanced DNS” tab
- Enable “Dynamic DNS” by toggling the switch
Step 2: Get Your Dynamic DNS Password
- Stay on the Advanced DNS page
- Look for “Dynamic DNS Password”
- Copy this Dynamic DNS password – you’ll need it for the change the password simply use the refresh button

Step 3: Configure Your Records
- Add an ‘A + Dynamic DNS’ record
- Set your hostname (e.g., ‘@’ for root domain, or ‘www’ for subdomain)
- Leave the IP address field empty – it will be updated automatically
Step 4: Set Up the Updater
You have several options for updating your IP:
Option 1: Using ddclient (Linux)
bash# Install ddclient
sudo apt-get install ddclient
# Edit configuration
sudo nano /etc/ddclient.conf
# Add these lines:
protocol=namecheap
use=web
server=dynamicdns.park-your-domain.com
login=yourdomain.com
password=your_dynamic_dns_password
yourdomain.com
Option 2: Using the URL Method
You can update your IP by visiting this URL:
curl -k https://dynamicdns.park-your-domain.com/update?host=@&domain=yourdomain.com&password=DYNAMICDNSPASSWORD
Option 3: Using a Scheduled Task (Windows)
Create a PowerShell script and schedule it to run periodically:
$url = "https://dynamicdns.park-your-domain.com/update"
$params = @{
host = "@"
domain = "yourdomain.com"
password = "your_dynamic_dns_password"
}
Invoke-RestMethod -Uri $url -Body $params
Option 4 – Go Progam multiple domains
Finally, if you want to update multiple domains , I have created a simple Go Lang program that checks your current WAN IP every xx minutes then when it detects a change it runs through the confg.json file updates the domains DNS records automatically.
Here’s the link to the GitHub code: https://github.com/acbrandao/GoDnsUpdater/tree/main
{
"domains": [
{
"domain": "example.com",
"host": "@",
"password": "your-ddns-password-1"
},
{
"domain": "example.com",
"host": "www",
"password": "your-ddns-password-1"
},
{
"domain": "otherdomain.com",
"host": "@",
"password": "your-ddns-password-2"
}
],
"check_interval_minutes": 5,
"log_file": "ddns.log"
}
Verification
After setting up your updater, verify it’s working by:
- Check your domain’s DNS records in Namecheap
- The IP address should match your current public IP
- Try pinging your domain to ensure it resolves correctly
Remember to keep your Dynamic DNS password secure and never share it publicly. If you suspect it’s been compromised, you can generate a new one from the Namecheap dashboard.
Troubleshooting
If your updates aren’t working:
- Verify your password is correct
- Check if your domain has Dynamic DNS enabled
- Ensure your A + Dynamic DNS record is properly configured
- Look for any error messages in your updater logs