Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Cloud DNS mendukung berbagai jenis kebijakan. Halaman ini memberikan
detail tentang berbagai jenis kebijakan dan kapan Anda dapat menggunakan salah satunya.
Kebijakan server menerapkan konfigurasi DNS pribadi ke jaringan Virtual Private Cloud (VPC) (penerusan DNS, logging).
Kebijakan respons mengganti respons DNS pribadi berdasarkan nama kueri.
Anda dapat menggunakan ketiga kebijakan tersebut secara bersamaan, bergantung pada kebutuhan Anda.
Kebijakan server
Gunakan kebijakan server untuk menyiapkan deployment campuran untuk resolusi DNS. Anda dapat menyiapkan kebijakan server masuk, bergantung pada arah resolusi DNS. Jika beban kerja Anda berencana menggunakan resolver DNS lokal, Anda dapat menyiapkan zona penerusan DNS menggunakan kebijakan server keluar. Di sisi lain, jika Anda ingin workload on-premise me-resolve nama diGoogle Cloud, Anda dapat menyiapkan kebijakan server masuk.
Gunakan kebijakan respons untuk menambahkan aturan kustom yang mengubah cara kueri DNS ditangani dalam jaringan Anda. Resolver DNS akan melihat aturan ini selama pencarian DNS. Kebijakan respons memungkinkan Anda menyesuaikan pengelolaan DNS dalam zona pribadi dengan menggunakan aturan, bukan data. Jika aturan dalam kebijakan respons memengaruhi kueri yang masuk, aturan tersebut akan diproses; jika tidak, pencarian akan dilanjutkan secara normal.
Gunakan aturan ini untuk mendapatkan hasil yang mirip dengan konsep draf zona kebijakan respons
(RPZ) DNS
(IETF). Untuk mengetahui informasi tentang cara mengelola kebijakan respons, lihat Mengelola kebijakan dan aturan respons.
Kebijakan respons berbeda dengan RPZ, yang merupakan zona DNS normal
dengan data yang diformat secara khusus yang menyebabkan resolver yang kompatibel
memberikan respons yang berbeda terhadap kueri. Kebijakan respons bukan zona DNS
dan dikelola secara terpisah. Untuk mengetahui informasi selengkapnya, lihat
Mengelola kebijakan dan aturan respons.
Kebijakan perutean
Gunakan kebijakan perutean DNS untuk kumpulan data resource yang ditetapkan untuk mengarahkan traffic berdasarkan kueri dan faktor lainnya, seperti weighted round robin (WRR), geolokasi, atau failover. Kebijakan pemilihan rute DNS memungkinkan Anda melakukan hal berikut:
Arahkan traffic dari lokasi geografis ke penyedia jaringan penayangan konten (CDN).
Arahkan traffic on-premise Anda ke load balancer Google Cloud berdasarkan
wilayah sumber kueri.
Tentukan bahwa traffic yang berasal dari benua tertentu ditayangkan oleh layanan di benua yang sama.
Merutekan traffic ke berbagai penyedia layanan berdasarkan WRR.
Aktifkan layanan baru dengan persentase total traffic.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-11 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)"]]