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 or AAAA record for your domain or subdomain that lets the Google name servers know to expect a dynamic IP.
- Generates a username and password that 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 works with both IPv4 and IPv6 addresses.
Setting up a dynamic DNS synthetic record
- Sign in to Google Domains.
- Select the name of your domain.
- In the left-hand navigation panel, click DNS.
- Scroll down to Synthetic records.
- Select Dynamic DNS from the list of synthetic record types.
- Enter the name of the resource that you plan to have assigned a dynamic IP, either a subdomain or @ for your default domain ('root domain' or 'naked domain').
- If you selected subdomain, enter the name of the subdomain.
- Click Add.
- 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.
- Click View credentials to view the username and password created for this record.
- Note the username and password created for the synthetic record. You'll 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.
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.
|DDclient with Google Domains support|
General client configuration examples:
without Google Domains support
Sample ddclient.conf entries:
Add the following to your inadyn.conf
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 a POST request (GET is also allowed) to the following URL:
The API requires HTTPS. Here's an example request:
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=188.8.131.52 HTTP/1.1
Authorisation: Basic base64-encoded-auth-string User-Agent: Chrome/41.0 email@example.com
||Required||The generated username and password associated with the host that is to be updated.|
||Required||The hostname to be updated.|
(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.
||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
One of the following responses will be returned after the request is processed.
||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.|
||Success||The supplied IP address is already set for this host. You should not attempt another update until your IP address changes.|
||Error||The hostname does not exist or does not have dynamic DNS enabled.|
||Error||The username/password combination is not valid for the specified host.|
||Error||The supplied hostname is not a valid fully qualified domain name.|
||Error||Your dynamic DNS client is making bad requests. Ensure that the user agent is set in the request.|
||Error||Dynamic DNS access for the hostname has been blocked due to failure to interpret previous responses correctly.|
||Error||An error happened on our end. Wait 5 minutes and retry.|