Stay organized with collections
Save and categorize content based on your preferences.
Cloud DNS supports different types of policies. This page provides
details about the different policy types and when you can use one or the other.
Server policies apply private DNS configuration to a
Virtual Private Cloud (VPC) network (DNS forwarding, logging).
Response policies override private DNS responses based on the query
name.
Routing policies steer traffic based on the query (for example, round robin,
geolocation).
You can use all three policies at the same time depending on your needs.
Server policies
Use server policies to set up hybrid deployments for DNS resolutions. You
can set up an inbound server policy depending on the direction of DNS
resolutions. If your workloads plan to use an on-premises DNS resolver, you can
set up DNS forwarding zones by using an outbound server policy. On the
other hand, if you want your on-premises workloads to resolve names on
Google Cloud, you can set up an inbound server policy.
Use response policies to add custom rules that modify how DNS queries are
handled within your network. The DNS resolver consults these rules during DNS
lookups. Response policies let you customize DNS management within a private
zone by using rules instead of records. If a rule in the response policy affects
the incoming query, it is processed; otherwise, the lookup proceeds normally.
Use these rules to achieve results similar to the DNS response policy zone
(RPZ) draft concept
(IETF). For
information about how to manage response policies, see Manage response policies
and rules.
A response policy is different from an RPZ, which is an otherwise normal DNS
zone with specially formatted data that causes compatible resolvers to
provide different responses to queries. Response policies aren't DNS zones
and are managed separately. For more information, see
Manage response policies and rules.
Routing policies
Use DNS routing policies for a resource record set to steer traffic based on
the query and other factors, such as weighted round robin (WRR), geolocation,
or failover. DNS routing policies lets you do the following:
Steer traffic from a geographical location to a content delivery network (CDN)
provider.
Route your on-premises traffic to Google Cloud load balancers based on
the query's source region.
Specify that traffic that originated from a specific continent is served by
services in the same continent.
Route traffic to different service providers on WRR basis.
Onboard new services with a percentage of the total traffic.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eCloud DNS offers server policies for configuring private DNS in a Virtual Private Cloud (VPC), including DNS forwarding and logging.\u003c/p\u003e\n"],["\u003cp\u003eResponse policies allow for the customization of DNS query handling within a network by overriding private DNS responses based on the query name.\u003c/p\u003e\n"],["\u003cp\u003eRouting policies direct traffic based on various factors, such as round robin and geolocation, to steer traffic to specific locations or services.\u003c/p\u003e\n"],["\u003cp\u003eAll three types of policies (server, response, and routing) can be implemented simultaneously to fit the specific needs of your network setup.\u003c/p\u003e\n"]]],[],null,["# DNS policies overview\n\nCloud DNS supports different types of policies. This page provides\ndetails about the different policy types and when you can use one or the other.\n\n- **Server policies** apply private DNS configuration to a Virtual Private Cloud (VPC) network (DNS forwarding, logging).\n- **Response policies** override private DNS responses based on the query name.\n- **Routing policies** steer traffic based on the query (for example, round robin, geolocation).\n\nYou can use all three policies at the same time depending on your needs.\n\nServer policies\n---------------\n\nUse server policies to set up hybrid deployments for DNS resolutions. You\ncan set up an inbound server policy depending on the direction of DNS\nresolutions. If your workloads plan to use an on-premises DNS resolver, you can\nset up DNS forwarding zones by using an outbound server policy. On the\nother hand, if you want your on-premises workloads to resolve names on\nGoogle Cloud, you can set up an inbound server policy.\n\nFor more information, see the\n[Server policies overview](/dns/docs/server-policies-overview).\n\nResponse policies\n-----------------\n\nUse response policies to add custom rules that modify how DNS queries are\nhandled within your network. The DNS resolver consults these rules during DNS\nlookups. Response policies let you customize DNS management within a private\nzone by using rules instead of records. If a rule in the response policy affects\nthe incoming query, it is processed; otherwise, the lookup proceeds normally.\nUse these rules to achieve results similar to the DNS [response policy zone\n(RPZ)](https://wikipedia.org/wiki/Response_policy_zone) draft concept\n([IETF](https://datatracker.ietf.org/doc/draft-ietf-dnsop-dns-rpz/)). For\ninformation about how to manage response policies, see [Manage response policies\nand rules](/dns/docs/zones/manage-response-policies).\n\nA response policy is different from an RPZ, which is an otherwise normal DNS\nzone with specially formatted data that causes compatible resolvers to\nprovide different responses to queries. Response policies aren't DNS zones\nand are managed separately. For more information, see\n[Manage response policies and rules](/dns/docs/zones/manage-response-policies).\n\nRouting policies\n----------------\n\nUse DNS routing policies for a resource record set to steer traffic based on\nthe query and other factors, such as weighted round robin (WRR), geolocation,\nor failover. DNS routing policies lets you do the following:\n\n- Steer traffic from a geographical location to a content delivery network (CDN) provider.\n- Route your on-premises traffic to Google Cloud load balancers based on the query's source region.\n- Specify that traffic that originated from a specific continent is served by services in the same continent.\n- Route traffic to different service providers on WRR basis.\n- Onboard new services with a percentage of the total traffic.\n\nFor more information, see [DNS routing policies and health checks](/dns/docs/routing-policies-overview).\n\nWhat's next\n-----------\n\n- [Apply DNS server policies](/dns/docs/policies)\n- [Manage response policies and\n rules](/dns/docs/zones/manage-response-policies)\n- [Manage DNS routing policies and health\n checks](/dns/docs/routing-policies-overview)"]]