Dynamic DNS (DDNS or DynDNS) is a method of automatically updating a name server in the Domain Name System (DNS), often in real time, with the active DDNS configuration of its configured hostnames, addresses or other information. (Wikipedia)
In English - a DDNS is needed when you have a DHCP ISP (WAN IP). If you restart your router you will get a different external IP (WAN IP). This is no good if you want to be able to access your services externally as everytime your IP changes you will have to remember it. This is where DDNS steps in.
A DDNS gives you a web address which resolves your WAN IP even if it changes. There are many services out there, most of them free!
For this guide I will use No-IP as a DDNS. Head over to No-IP.com and create an account.
Click on 'Dynamic DNS (Free)' on the left side and then click hostname.
Hostname - whatever you want for your domain name Domain - dropdown list, I left it on ddns.net IPv4 Address - your WAN IP, should already be filled in.
No we have a DDNS domain setup we need a way to automatically update the address with the WAN IP.
For the next part there are a few different ways to update the IP for the DDNS.
Some routers have a DDNS update client built in. The page below is from my Unifi Router
Here is a BT Router DDNS page
Once this step is setup your router will update the DDNS with your WAN IP everytime it changes.
There is also a client you can download and have run on a PC which updates the IP. Download it from No-IP Client
When setting it up, use the account settings you used when creating the No-IP account
There are other ways, however for now I will leave it with the 2 options above.