Created
February 20, 2016 17:21
-
-
Save cyrusboadway/5a7b715665f33c237996 to your computer and use it in GitHub Desktop.
Script to update a Google Domains DNS record
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### 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: https://support.google.com/domains/answer/6147083 | |
### Synthetic Records: https://support.google.com/domains/answer/6069273 | |
USERNAME="" | |
PASSWORD="" | |
HOSTNAME="yoursubdomain.yourdomain.here" | |
# Resolve current public IP | |
IP=$( dig +short myip.opendns.com @resolver1.opendns.com ) | |
# Update Google DNS Record | |
URL="https://${USERNAME}:${PASSWORD}@domains.google.com/nic/update?hostname=${HOSTNAME}&myip=${IP}" | |
curl -s $URL |
AdamKearn
commented
Jun 18, 2024
via email
I’m a bit confused why you need DDNS for squarespace? Isn’t that a static
address?
I recommend transferring your domains over to cloudflare. They do have an
API you can use.
I found a project called DDClient on GitHub that you can run every hour to
update your record.
…On Sun, 16 Jun 2024 at 2:37 PM, jlrosssc ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Does anyone know if there is an update to this to work with Squarespace
since Google Domains has retired?
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/cyrusboadway/5a7b715665f33c237996#gistcomment-5090553>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHJNB2YH4LN3UCX4NQ3X6P3ZHWIKZBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVAZTCNJVHE2TAONHORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Squarespace has a registrar & DNS business, independent of their hosting services: https://domains.squarespace.com
Squarespace purchased all Google Domains registrations: https://support.google.com/domains/answer/13689670
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