You want to reach the camera at the warehouse, the office file server, or the computer that stays on at home. You know it has an IP address, you type it in, it works. A week later it does not, because the address changed.
The cure is to give it a name, a subdomain of the domain you already have with us for instance, and have that name update itself every time the address moves. In cPanel the tool is called Dynamic DNS and it is under Domains.
How it works, in three pieces
| Piece |
What it is |
| The name |
A subdomain of a domain in your account. It is what you type from now on, and it never changes again. |
| The update address |
A secret address the panel gives you. Whoever opens it gets their address written into that name. |
| Whoever opens it |
A machine at the far end: the router, if it accepts an update address of your choosing, or a scheduled task on the computer sitting there. |
From then on it runs itself: the machine calls the address from time to time, the DNS record follows, and the name always points to wherever it is.
|
The update address is a key. Whoever holds it can point your subdomain at wherever they happen to be, and start receiving what was meant for you. Do not put it in a file inside the public website folder, do not commit it to a code repository, and do not paste it into a chat. Treat it as an access token, for the same reasons set out in cPanel API tokens.
|
The order that works
| 1 |
Check the domain’s zone is here. If the nameservers point elsewhere, this tool commands nothing, because it is not the one running the zone. To check: how to check a domain DNS.
|
|
| 2 |
Create the entry, choosing the subdomain name. Make it descriptive and boring, named after what it does: whoever comes after you will be grateful.
|
|
| 3 |
Store the update address the panel gives you, somewhere safe.
|
|
| 4 |
Have it called regularly by the machine at the other end. If the router has a dynamic DNS field that takes an address of your choosing, that is the cleanest route. If it does not, a scheduled task on that computer does the same job: cron jobs.
|
|
| 5 |
Confirm it. Give it a little while, then look the name up from another network, your phone’s mobile data for instance. If it answers with the right address, you are done.
|
|
|
The change is not instant for everybody. Every DNS record has a lifetime, and anyone who already asked keeps the old answer for that long. Just after the address moves there can be a few minutes where the name still points at the old place. That is how DNS works, and it is explained in DNS records explained and in how long propagation takes.
|
What this does not solve
| The hope |
The reality |
| «I can host my website at home now» |
You can, but your own connection now serves the visitors, at its upload speed and under your provider’s rules. This is a way of reaching a machine of yours, not a way of standing a website up. |
| «I will always be able to connect» |
Only if your connection genuinely has a public address. Many home connections and nearly all mobile ones share one address between several customers, and then no name reaches you. Ask your provider whether you have a public address. |
| «It makes things secure» |
It does not. It gives you a name, and nothing else. The machine at the far end still needs a password, still needs to be up to date, and still needs a certificate if it is going to serve pages. |
| «I can send e-mail from it» |
No. Sending e-mail from a home connection does not work in practice, for reasons set out in PTR and reverse DNS. |
| «My provider blocks ports anyway» |
Often it does, and a name changes nothing about that. Before building the whole thing, check with them that the port you want actually gets through. |
|
If the address turns out not to change, you do not need any of this. A fixed address goes into an ordinary record once and stays. Before setting up automatic updates, check what yours is today and look again in a few days: how to find your public IP address. The difference between the two kinds is in IP addresses explained.
|
RECOMMENDED PRODUCT Register your .co.mz domain Secure your company name before someone else registers it. from $41.68/yr Search a domain |