Search
Clear search
Close search
Google apps
Main menu

Dynamic DNS

Dynamic DNS allows you to direct your domain or a subdomain to a resource that is behind a gateway that has a dynamically assigned IP address.

To use dynamic DNS with Google Domains you set up a Dynamic DNS synthetic record. This synthetic record:

  • Sets up an A record for your domain or subdomain that lets the Google name servers know to expect a dynamic IP.
  • Generates a username and password your host or server will use to communicate the new IP address to the Google name servers.

Once you set up the Dynamic DNS synthetic record, you must set up a client program on your host or server (the resource behind the gateway) or on the gateway itself that detects IP address changes and uses the generated username and password and communicate the new address to the Google name servers.

Note: Dynamic DNS only works with IPv4 addresses. IPv6 addresses are typically not dynamically assigned.

Setting up a Dynamic DNS synthetic record

  1. Click My domains in the navbar and then click your domain name.
  2. Click the DNS tab .
  3. Scroll down to Synthetic Records.
  4. Select Dynamic DNS from the list of synthetic record types.
  5. Enter the name of the resource you plan to have assigned a Dynamic IP, either a subdomain or @ for your default domain (“root domain” or “naked domain”).
  6. If you selected sub-domain, enter the name of the subdomain.
  7. Click Add.
  8. The Dynamic DNS record is created in your list of synthetic records. Click the expand triangle to the left of the record to view its values.
  9. Click View Credentials to view the user name and password created for this record.
  10. Note the username and password created for the synthetic record. You will need these to configure your gateway or client software to contact the Google name servers.

You can edit or delete the record with the Edit and Delete buttons next to the record.


Tip: Directing a wild card (*) to a dynamic resource: 

While you cannot use a wildcard in a Dynamic DNS record, you can direct a wildcard to your naked domain or a particular subdomain with a CNAME record.

  1. Create a Dynamic DNS record for your naked domain using @ (@.example.com) or for the subdomain you want your wildcard redirected to.
  2. Create a CNAME record redirecting * (the wildcard) to your naked domain or subdomain. See Resource records for help with creating a CNAME record.

Setting up a client program on your gateway, host, or server

There are several popular dynamic DNS clients in use, such as DDclient and INADYN. In addition most routers have software built in to detect IP changes and communicate them with the name servers.

Note: Google Domains uses the dyndns2 protocol.

Configure your dynamic DNS client with:

  • Provider (or DNS or Service): The name of your DNS Provider.
  • Username: (or credential) the generated username in the Dynamic DNS record.
  • Password (or credential): the generated password in the Dynamic DNS record.

After you have created the record and configured your client software, test it by entering the subdomain and domain into a web browser (or appropriate client) and seeing that it connects to the correct resource.

Examples

DDclient now has support for Google Domains.

DDclient with Google Domains Support

ddclient.conf entries:

ssl=yes

protocol=googledomains

login=generated_username

password=generated_password

your_resource.your_domain.tld

General client configuration examples:

DDclient
without Google Domains support
INADYN

Sample ddclient.conf entries:

protocol=dyndns2

use=web

server=domains.google.com

ssl=yes

login=generated_username

password=generated_password

your_resource.your_domain.tld

Add the following to your inadyn.conf

system default@domains.google.com

username generated_username

password generated_password

alias sub.domain.tld

 

Using the API to update your Dynamic DNS record

Dynamic DNS client software automatically updates your dynamic DNS record. You can perform updates manually with the API by making making a POST request (GET is also allowed) to the following url:
https://domains.google.com/nic/update

The API requires HTTPS. Here’s an example request:
https://username:password@domains.google.com/nic/update?hostname=subdomain.yourdomain.com&myip=1.2.3.4

Note: You must set a user agent in your request as well. Web browsers will generally add this for you when testing via the above url. In any case, the final HTTP request sent to our servers should look something like this:

Example HTTP query:
POST /nic/update?hostname=subdomain.yourdomain.com&myip=1.2.3.4 HTTP/1.1
Host: domains.google.com
Authorization: Basic base64-encoded-auth-string User-Agent: Chrome/41.0 your_email@yourdomain.com

Request Parameters:

Parameter Required/Optional Description
username:password Required The generated username and password associated with the host that is to be updated.
hostname Required The hostname to be updated.
myip Optional
(Required if you have an IPv6 address)
The IP address to which the host will be set. If not supplied, we’ll use the IP of the agent that sent the request.

Note: Because the address must be an IPv4 address, myip is required if your agent uses an IPv6 address. You can check your agent’s IP address by going to https://domains.google.com/checkip.

offline Optional Sets the current host to offline status. If an update request is performed on an offline host, the host is removed from the offline state.
Allowed values are
  • yes
  • no

One of the following responses will be returned after the request is processed.

Please ensure you interpret the response correctly, or you risk having your client blocked from our system.
Response Status Description
good 1.2.3.4 Success The update was successful. Followed by a space and the updated IP address. You should not attempt another update until your IP address changes.
nochg 1.2.3.4 Success The supplied IP address is already set for this host. You should not attempt another update until your IP address changes.
nohost Error The hostname does not exist, or does not have Dynamic DNS enabled.
badauth Error The username / password combination is not valid for the specified host.
notfqdn Error The supplied hostname is not a valid fully-qualified domain name.
badagent Error Your Dynamic DNS client is making bad requests. Ensure the user agent is set in the request, and that you’re only attempting to set an IPv4 address. IPv6 is not supported.
abuse Error Dynamic DNS access for the hostname has been blocked due to failure to interpret previous responses correctly.
911 Error An error happened on our end. Wait 5 minutes and retry.
Was this article helpful?
How can we improve it?