Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2016 17:21
Show Gist options
  • Save cyrusboadway/5a7b715665f33c237996 to your computer and use it in GitHub Desktop.
Save cyrusboadway/5a7b715665f33c237996 to your computer and use it in GitHub Desktop.
Script to update a Google Domains DNS record
### Google Domains provides an API to update a DNS "Syntheitc record". This script
### updates a record with the script-runner's public IP, as resolved using a DNS
### lookup.
### Google Dynamic DNS:
### Synthetic Records:
# Resolve current public IP
IP=$( dig +short )
# Update Google DNS Record
curl -s $URL
Copy link

AdamKearn commented May 20, 2020

I know this is an old thread but you can just send a request to the URL and not include the IP just pass the username and password.
The API will then use the IP the request was sent from.


For more details see the section at the bottom of this page labelled "Using the API to update your Dynamic DNS record"

Copy link

ghost commented Dec 8, 2020

I had to change line 15 to IP=$( curl ). Other than that the script works.

Copy link

A stare is born

Copy link

Does anyone know if there is an update to this to work with Squarespace since Google Domains has retired?

Copy link

Squarespace does not offer an API for DNS configuration. There is no practical mechanism to programmatically manage dynamic DNS records for domains they manage.

Copy link

AdamKearn commented Jun 18, 2024 via email

Copy link

cyrusboadway commented Jun 18, 2024

Squarespace has a registrar & DNS business, independent of their hosting services:

Squarespace purchased all Google Domains registrations:

Any users whose domain registrations were transferred with the purchase would need to find a new registrar if they want a DDNS API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment