Query using DNS

Service Directory supports DNS queries for the following record types:

  • A/AAAA/SRV records for a service or an endpoint
  • SOA/NS records for the private zone origin

For a detailed explanation of these record types, see List of DNS record types.

A/AAAA queries must observe the following format:

SERVICE_NAME.ZONE_DOMAIN_NAME

Optionally:

ENDPOINT_NAME.SERVICE_NAME.ZONE_DOMAIN_NAME

SRV queries must observe the following format:

_SERVICE_NAME._tcp.SERVICE_NAME.ZONE_DOMAIN_NAME

Optionally:

_SERVICE_NAME._tcp.ENDPOINT_NAME.SERVICE_NAME.ZONE_DOMAIN_NAME

All services and endpoints in Service Directory default to having their service name as the symbolic service and a protocol of tcp.

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.