Web HostingPublished on December 10, 20256 min read

Set up Dynamic DNS (DDNS) on cPanel

cPanel's Dynamic DNS (DDNS) keeps a subdomain up to date when the IP address of your home or office connection changes. This guide shows how to set up cPanel dynamic DNS on your OuiHeberg web hosting, then how to configure your router, a NAS or a script so the address stays current.


What is Dynamic DNS?

Most internet connections, at home and in small offices, get an IP address that changes from time to time. A domain that points to that address goes wrong at each change. Dynamic DNS fixes the record on its own.

It works in three steps.

  1. cPanel creates a subdomain, such as home.mysite.com, and a secret address called the webcall URL.

  2. Your router, NAS or a script calls that URL from your network, at regular intervals or when the address changes.

  3. cPanel updates the subdomain with the IP address the call came from.

DDNS lets you reach a NAS, cameras, a home automation hub, a remote desktop or a VPN endpoint from outside.

cPanel updates its own DNS zone. DDNS therefore only works if your domain uses the OuiHeberg nameservers, ns1.ouiheberg.com to ns4.ouiheberg.com. The guide How to edit the DNS records of your domain explains how to check.


Access the Dynamic DNS interface

DDNS is not in the client area. It is set up in cPanel.

  1. Log in to dash.ouiheberg.com. In the left menu, click My Services, then your hosting plan.

  2. Click Advanced panel at the top right of the page. cPanel opens straight away, with no login details to type.

  3. In the Domains section, click Dynamic DNS. You can also type "dynamic" in the Search Tools bar.

The page lists your DDNS domains. The first time, it shows "No DDNS configuration. Click “Create” to begin."

cPanel Dynamic DNS page with an example DDNS domain and the Create button


Create a DDNS domain

  1. Click Create, on the right above the table.

  2. In Dynamic DNS Domain, type the subdomain prefix, then pick the domain from the list.

  3. Optionally add a Description, to recognise this domain in the list.

  4. Click Create.

FieldRoleExample
Dynamic DNS Domainsubdomain prefix and domainhome and mysite.com
Manually Enter An IP Address (Optional)address to record right away, optional203.0.113.25
Descriptiona name to find your way aroundHome router

Common prefixes include home, nas, cam, office, files and vpn. The "Stay on this page after I click “Create”" box lets you create several in a row.

If you leave the address empty, the IP Address column shows "None" until the webcall URL is first called. cPanel then records the address the call comes from.

Create Dynamic DNS Domain form with the subdomain, the domain and the description

cPanel creates the subdomain and generates its webcall URL, in this form:

https://mysite.com/cpanelwebcall/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The webcall URL is as sensitive as a password. Anyone who knows it can point your subdomain to their own address. Do not publish it or paste it into a ticket or a forum.


Understanding the Dynamic DNS interface

Once the domain is created, the table shows four columns.

ColumnContent
Domainthe full subdomain, such as home.mysite.com
IP Addressthe recorded IPv4 or IPv6 address
URLthe webcall URL, to copy into your router
SSL Certificatethe View SSL Certificate link if the domain has a certificate, otherwise "No certificate available for this domain."

The Copy button under the URL copies it. The arrow to the left of the domain expands its details, and the pencil next to the description lets you change it. Last Update Time gives the date of the last address change, Last Run Time the date of the last call received, even without a change.

Dynamic DNS list with a domain, its masked webcall URL and the Copy button


Configure your router

Every router has its own interface, but the steps are the same.

  1. Open the router's admin interface.

  2. Look for the DDNS or Dynamic DNS section.

  3. Pick a custom provider (Custom, URL Update or similar).

  4. Paste the webcall URL copied from cPanel, starting with https://.

  5. If the router asks for it, import the certificate shown by View SSL Certificate.

  6. Save, then check in cPanel that Last Run Time updates.

The URL contains no username or password, so the URL itself is the secret. Keep https:// so it never travels in clear text.

Firmware or deviceWhere to set DDNS
DD-WRTDD-WRT DDNS documentation, custom provider
pfSenseDynDNS client, Custom type
OPNsenseDynamic DNS, custom service
OpenWrtddns-scripts package, custom update URL
SynologyControl Panel › External Access › DDNS, custom provider
ASUSWAN › DDNS, custom server depending on the firmware

Update with a curl script

If your router does not accept a custom URL, a script can call the URL from a device on your network, such as a Raspberry Pi. The call must come from your network, because cPanel records the address it comes from.

#!/bin/bash
# cPanel DDNS update
WEBCALL_URL="https://mysite.com/cpanelwebcall/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Call the webcall URL
curl -s "$WEBCALL_URL"

# Log (optional)
echo "$(date): DDNS updated" >> /var/log/ddns-update.log

Then schedule it with cron, for example every five minutes.

# Open the cron table
crontab -e

# Add this line: call every 5 minutes
*/5 * * * * /path/to/ddns-script.sh

Manage your DDNS domains

Regenerate the webcall URL

If you think the URL has leaked, replace it.

  1. Tick the domain's box.

  2. Click Action, then Recreate URL.

The old URL stops working. Copy the new one into your router or script.

Delete a DDNS domain

  1. Tick the domain's box.

  2. Click Action, then Delete.

  3. Confirm the deletion.

Deletion is permanent. The subdomain no longer points to your network. Its SSL certificate, however, is not deleted.


Practical use cases

For each service, forward the port shown on your router to the device concerned. These ports are the defaults of the software listed.

UseSubdomainPort to forward
Synology or QNAP NASnas.mysite.com5000 (HTTP) or 5001 (HTTPS) on Synology
Security camerascam.mysite.comyour recorder's port, often 8080
Home Assistanthome.mysite.com8123
OpenVPNvpn.mysite.com1194 (UDP)
WireGuardvpn.mysite.com51820 (UDP)

On a Synology NAS, DDNS is set in Control Panel › External Access › DDNS. Pick a custom provider and paste the webcall URL as the update address.


Troubleshooting

The IP address does not update

  • Open the webcall URL in a browser from your network, then check Last Run Time in cPanel.

  • Read the router's log for a DDNS error.

  • Check that the certificate is imported if the router asks for it.

  • Test the call with curl, which shows the details of the exchange.

curl -v "https://mysite.com/cpanelwebcall/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

SSL certificate error

If the router rejects the certificate, copy it from View SSL Certificate and import it into the router's certificate section. Turning off certificate checks sends the URL without protection, so avoid it.

The subdomain does not resolve

  1. Check that the domain uses ns1.ouiheberg.com to ns4.ouiheberg.com.

  2. Check the public answer with our DNS lookup tool, or with dig.

  3. Give propagation time, usually under an hour, sometimes up to 48 hours for a new subdomain.

  4. Clear your computer's DNS cache.

dig home.mysite.com A

On Windows:

ipconfig /flushdns

On macOS:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

On Linux (systemd-resolved):

sudo resolvectl flush-caches

Check that DDNS works

Compare your network's public IP address with the subdomain's. Both must match.

# Your network's public IP address
curl ifconfig.me

# Address recorded for the subdomain
dig +short home.mysite.com

Security best practices

DDNS makes your devices reachable from the internet. Protect them accordingly.

  • Keep the webcall URL secret and call it over https://. Regenerate it at the slightest doubt.

  • Open only the ports you need on your router, and prefer a VPN to reach the rest of the network.

  • Turn on authentication for every exposed service, with strong passwords.

  • Change default ports when the service allows it.

  • Block repeated attempts with fail2ban or the device's built-in protection.

  • Keep the firmware of your router, NAS and cameras up to date.


Need help?

Open a ticket from Tickets › Open a ticket (dash.ouiheberg.com/tickets/new), or click the Contact support tile at the bottom of your hosting page. You can also ask your question on our Discord.

Was this article helpful?

599 views
Share this article
Hébergement web
Need web hosting?

cPanel hosting with email accounts and databases, managed from the OuiHeberg client area.

View plans →

Related Articles