Domains and DNS

Dynamic DNS: point a subdomain to a dynamic IP from cPanel

Reviewed on 5 min read dynamic DNS subdomains

If your domain has no hosting, manage dynamic DNS from the client area: dynamic DNS from the client area.

Dynamic DNS creates a subdomain that points to a dynamic IP and is updated every time that IP changes. It lets you use an easy name, such as nas.tudominio.com, to reach a NAS, a web server, a camera or a computer in your office or home, even if your provider changes your IP.

1. Create the subdomain

In cPanel, go to Domains > Dynamic DNS and click Create.

  • In Dynamic DNS Domain, type the prefix (in the example, nas) and choose the domain.
  • In Description, enter a name that helps you recognise it.
  • If you want to set an IP now, click Manually Enter An IP Address. If not, it will be filled in on the first update.

Form for creating a Dynamic DNS domain in cPanel

Click Create. The subdomain will appear in the list with a URL ending in /cpanelwebcall/ followed by a code. Copy it with Copy.

That URL is the key to changing the subdomain's IP: anyone who has it can do so. Do not publish it. If it leaks, delete the subdomain and create it again to get a new one.

2. Keep the IP up to date

Every time the URL is opened, cPanel sets the subdomain to the IP the request came from. That is why the call has to be made from the network whose IP you want to publish (not from the hosting, a VPN or a proxy). There are three ways to do it:

From the router. Many routers have a dynamic DNS (DDNS) section with an option for a custom provider or «Custom». Paste the URL there and the router will call it every time the IP changes.

From the NAS. Synology, QNAP and similar devices have the same feature in their control panel, in the DDNS or external access section. Choose the custom provider and paste the URL.

With a cron job. On a computer in that network that is always on (a Linux server, a Raspberry Pi...), schedule it to call the URL every 5 minutes. Run crontab -e and add:

*/5 * * * * curl -s "https://tudominio.com/cpanelwebcall/TU_CODIGO" > /dev/null

Replace the URL with the one you copied. If the IP has not changed, cPanel leaves the subdomain as it is. The Last Run Time column in the list shows when the last update was made.

3. Access over HTTPS

cPanel generates an SSL certificate for the subdomain. From View SSL Certificate in the list you can copy it and install it on the NAS or device so that it accepts HTTPS connections with that name. The certificate has to be installed on the device; it is not enough for it to exist in cPanel.

If the name resolves but does not connect

  • Check that the subdomain points to your current IP: search for «what is my IP» from that network and compare it with the IP Address column.
  • Open the service's port on the router (for example 443 or 5001 on a NAS) and forward it to the device.
  • If your provider uses CGNAT (sharing one public IP between several customers), you will not be able to receive connections from outside even if the DNS is correct. Ask your provider for a public IP.
  • If the connection has IPv6, check that the AAAA record is the device's and that the router's firewall allows incoming traffic.

Differences from dynamic DNS in the client area

Feature Dynamic DNS in cPanel Dynamic DNS in the client area
Requirement Domain with hosting Domain without hosting
Where it is managed cPanel Client area
Multiple entries One per subdomain Up to 10 per domain
If the URL or token leaks Delete and create the subdomain again Regenerate the token
IPv6 Supported Supported

You may also find useful

Something wrong or out of date? Tell us and we will review it.