Once upon a time, the way to redirect your domain, to a dynamic ip address (Like your home internet connection), was to use a service like DynDns (Now owned by Oracle), it worked, but cost some non negligible dough, and is  limited (In number of DNS query) ….

Since then, Google entered the Domain registrar market, with  really competitive pricing, modern interface, and with a really appealing feature set, like free privacy protection, the use of the really good DNS system, and Dynamic DNS solution.

Unlike Dyndns, Google Domain Dynamic URL, don’t have an official client, but support dyndns2 protocol, so client supporting it will work (DDclient,INADYN) like DynDns it support updating via URL (Via SSL, with credential), so a really flexible way to update your Dynamic IP easily.

Prerequisite :

  • The domain registrar need to be Google Domain
  • You must use the Google DNS server (No Cloudflare or hosting service DNS)
  • A coffee, not strictly needed, this procedure is simple and Quick ….

1 –  Adding a Synthetic record .

Pretty straightforward, you go to the synthetic records section, choose Dynamic DNS in the drop down, add your subdomain you want, and voila .

2- Build up your API call.

Again, pretty straightforward, : https://USERNAME:[email protected]/nic/update?hostname=YOURHOSTNAME&myip=MYIP

So you get your Username/password from the google interface, put your hostname (Subdomain + domain), the “My IP” part is optional, remove this part if you call the URL from within the dynamic address network.

That’s it, your API call is DONE ….

3- configure some way to call the API automatically on a regular basis …

So now you only need to call the API regularly (Hour, minute, days), to be sure it’s always on the right IP .

This part is highly OS specific ,

On linux-like OS ,A simple bash script, or even put a simple Curl command in Cron will work.

On Windows, downloading/Installing Wget for windows, and use the task scheduler, will also work.

All done, you can test it by calling a custom URL directly in a browser, or in terminal .