[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe Beta DoH service on dns.google.com using non-anycast IP addresses is deprecated and will be turned down.\u003c/p\u003e\n"],["\u003cp\u003eThe experimental version of the RFC 8484 API is deprecated, with dns.google/experimental redirecting to dns.google/dns-query.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Public DNS supports the JSON API at /resolve and plans to continue support until a comparable webapp-friendly DoH standard exists.\u003c/p\u003e\n"],["\u003cp\u003eDoH applications should use dns.google instead of dns.google.com for Google DoH, regardless of the API used.\u003c/p\u003e\n"],["\u003cp\u003eDoH clients should follow HTTP redirects, and applications need to be updated to ensure compatibility with these changes.\u003c/p\u003e\n"]]],["The beta DoH service on `dns.google.com` is deprecated, transitioning to `dns.google`. The experimental API is also deprecated, with `/experimental` redirecting to `/dns-query`. Applications must use `dns.google` instead of `dns.google.com` and should utilize Google Public DNS anycast IPs, or follow HTTP redirects. RFC 8484 DoH requires `application/dns-message` content type and Base64Url encoding. The process had several steps with defined dates.\n"],null,["# Migration to anycast and RFC 8484 DoH\n\nAs part of the launch of DoH on the dns.google domain and the well-known anycast\nIP addresses for Google Public DNS, the *Beta* DoH service on the dns.google.com\ndomain *using other IP addresses* is now deprecated and will be turned down.\n\nThe *experimental* version of the RFC 8484 API is also deprecated;\n**dns.google** /experimental is not supported, and\n**dns.google.com**/experimental will be migrated to dns.google/dns-query.\n| **Important:** Google Public DNS supports the [JSON API](/speed/public-dns/docs/doh/json) at `/resolve` and plans to do so until there is a comparable standard for webapp-friendly DoH.\n\nTimeline\n--------\n\n| Date | Turndown step |\n|-------------------------------|------------------------------------------------------------------------------------------------|\n| ~~2019-07-23~~ **2019-08-01** | [`dns.google.com/experimental` redirects to `dns.google/dns-query`](#step-1) -- `DONE` |\n| ~~2019-08-05~~ **2019-08-21** | [**dns.google.com** resolves to Google Public DNS **anycast** IP addresses](#step-2) -- `DONE` |\n| **2019-09-24** | [**Old IP addresses** for dns.google.com redirect to **dns.google**](#step-3) -- `DONE` |\n| **2020-06-23** | [**dns.google.com** redirects to **dns.google** everywhere](#step-4) |\n\nChanges to this timeline are updated here and posted to [public-dns-announce](https://groups.google.com/forum/#!forum/public-dns-announce).\nSubscribe to that low-volume mailing list for updates.\n\nThursday, August 1, 2019\n\n: Requests for `https://dns.google.com/experimental` get HTTP 301\n redirects to `https://dns.google/dns-query`.\n\n \u003e *DoH applications using the JSON API at `/resolve` are not affected.*\n\n - To work with Google DoH, applications that used `/experimental` must\n support at least one of the following:\n\n - [URI Templates for configuration](#uri-templates)\n - [Use `https://dns.google/dns-query` for RFC 8484 DoH](#dns-query)\n - [Follow HTTP redirects](#http-redirects)\n - RFC 8484 DoH applications must also implement *both* of the following:\n\n - [Accept and send `application/dns-message`](#accept)\n - [Use Base64Url encoding for GET `dns` parameter](#base64url)\n\nWednesday, August 21, 2019\n\n: `dns.google.com` resolves to the [Google Public DNS anycast IP addresses](https://developers.google.com/speed/public-dns/docs/using#google_public_dns_ip_addresses).\n\n \u003e *This is transparent for most DoH applications, with no changes needed.*\n\n \u003cbr /\u003e\n\nTuesday, September 24, 2019\n\n: DoH queries to former dns.google.com IP addresses get HTTP 301\n redirects to `https://dns.google/`.\n\n \u003e *This may affect DoH applications using either the RFC 8484 or JSON API.*\n\n Applications that send DoH requests to hardcoded, configurable, or\n permanently cached *IP addresses* must support one or both of the following:\n\n - [Use Google Public DNS anycast IP addresses](#anycast)\n - [Follow HTTP redirects](#http-redirects)\n\nTuesday, June 23, 2020\n\n: DoH queries to dns.google.com on anycast IP addresses get HTTP 301\n redirects to dns.google.\n\n \u003e *This may affect DoH applications using either the RFC 8484 or JSON API.*\n\n To work with Google DoH, applications must support at least one of the\n following:\n\n - [URI Templates for configuration](#uri-templates)\n - [Use dns.google domain for Google DoH](#dns-google)\n - [Follow HTTP redirects](#http-redirects)\n\nChanges for DoH clients\n-----------------------\n\n### Follow HTTP redirects\n\nDoH servers are just HTTP servers handling DNS queries. As such, they may return\n[HTTP redirects](/speed/public-dns/docs/doh#redirects) (codes 301, 302, 307, or 308), and DoH clients\nshould follow those redirects just like any other HTTP client.\n\nDevelopers can check HTTP redirect support with `https://8.8.8.8/experimental`\nor `https://8.8.8.8/resolve` as the base for their DoH URLs; these return HTTP\n301 redirects to `https://dns.google/dns-query` and `https://dns.google/resolve`\n(preserving any GET parameters).\n\n### Use dns.google domain for Google DoH\n\nDoH applications should use dns.google instead of dns.google.com. Whether using\nthe RFC 8484 or JSON API, any DoH applications with a hard-coded or configured\nlist of DoH resolvers need to replace dns.google.com with dns.google in any URLs\nor URI templates.\n\n### Use Google Public DNS anycast IP addresses\n\nDoH applications that send *DoH* requests to a hard-coded or configured list of\nIP addresses (even just for bootstrapping) need to replace former addresses of\ndns.google.com with the [Google Public DNS anycast IP addresses](https://developers.google.com/speed/public-dns/docs/using#google_public_dns_ip_addresses).\n\n### URI Templates for configuration\n\nDoH applications should provide configurability for endpoints; the preferred and\nstandard way to do this is with [URI templates](https://tools.ietf.org/html/rfc6570). DoH application developers\nwith full configurability should notify users of the new URL (URI template:\n`https://dns.google/dns-query{?dns}`).\n\n### Use `https://dns.google/dns-query` for RFC 8484 DoH\n\nDoH applications with a hard-coded or configured list of DoH resolvers need to\nreplace the `https://dns.google.com/experimental` URL for the internet-draft DoH\nAPI with `https://dns.google/dns-query` and confirm full RFC 8484 compliance.\n\nThe `/experimental` API (only available at dns.google.com) accepted queries\nusing non-websafe Base64 encoding and `application/dns-udpwireformat` content\ntype that are rejected by the `/dns-query` API (only available at dns.google).\nThese differences are described in the following two sections.\n\n### Use Base64Url encoding for GET `dns` parameter\n\nUse websafe [Base64Url](https://tools.ietf.org/html/rfc4648#section-5) encoding for the `dns` parameter in GET requests,\nreplacing Base64 (`+` `/`) with (`-` `_`) and removing padding (`=`) characters.\n\n### Accept and send `application/dns-message`\n\nUse [`application/dns-message`](https://tools.ietf.org/html/rfc8484#section-4.1)\nin the Accept header (and for RFC 8484 POST, in the Content-Type header) and\naccept it as the Content-Type of responses.\n\nUsing the old Content-Type for POST will fail with 415 Unsupported Media Type.\n\nApplications using the old Content-Type in the Accept header will get responses\nwith Content-Type application/dns-message. DoH applications that accept these,\nand do not ignore them because of unexpected Content-Type, will still work.\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e"]]