Skip to content

Using Dynamic DNS in cPanel

Most home and office internet connections get a new public IP address from time to time. Dynamic DNS keeps a subdomain, such as office.example.com, pointing at that connection, so you can always reach a device there (a CCTV recorder, a NAS, a home server or a remote desktop) by name instead of by IP address.

  1. Log in to cPanel and open Dynamic DNS under Domains.
  2. Click Create.
  3. Enter the subdomain, for example office, and choose your domain.
  4. Optionally add a description, such as “Office CCTV”.
  5. Click Create.

cPanel shows a webcall URL, a secret address that updates the subdomain’s IP address when it’s visited. Copy it and keep it private: anyone with the URL can change where your subdomain points.

Step 2: Visit the webcall URL from the connection you want to track

Section titled “Step 2: Visit the webcall URL from the connection you want to track”

Whenever the webcall URL is visited from your home or office network, cPanel updates the subdomain to that network’s current public IP address. Set something on that network to visit it regularly:

A router or NAS. Many routers and NAS devices have a Custom DDNS or Dynamic DNS → Custom option. Paste the webcall URL as the update URL.

A computer that’s always on.

  • Linux or macOS: add a cron job that runs every 15 minutes:

    Terminal window
    */15 * * * * curl -s "WEBCALL_URL" > /dev/null
  • Windows: create a scheduled task in Task Scheduler that runs every 15 minutes:

    Terminal window
    powershell -Command "Invoke-WebRequest -UseBasicParsing 'WEBCALL_URL'"

Replace WEBCALL_URL with your webcall URL.

After the first update, office.example.com points to your network’s public IP address. Check with:

Terminal window
nslookup office.example.com

Compare it with your IP address (search “what is my IP” from that network). DNS changes can take a few minutes to show.

  • Port forwarding: Dynamic DNS only points the name at your connection. To reach a device behind your router, you also need to set up port forwarding on the router, and the device should be protected with a strong password.
  • CGNAT: some mobile and fibre providers share one public IP address between many customers (carrier-grade NAT). If so, incoming connections won’t reach you even with Dynamic DNS. Ask your provider for a public IP address.
  • Rotating the URL: if the webcall URL leaks, delete the Dynamic DNS entry in cPanel and create a new one, then update your router or script.

Was this page helpful?