| Internet-Draft | Redirect Headers | January 2026 |
| Hardt & Goto | Expires 9 July 2026 | [Page] |
This document defines HTTP headers that enable secure parameter passing and mutual authentication during browser redirects. The Redirect-Query header carries parameters in browser-controlled headers instead of URLs, preventing leakage through browser history, Referer headers, server logs, and analytics systems. The Redirect-Origin header provides browser-verified origin authentication that cannot be spoofed or stripped, enabling reliable mutual authentication between parties. The optional Redirect-Path header allows servers to request path-specific origin verification. Together, these headers address critical security and privacy concerns in authentication and authorization protocols such as OAuth 2.0, OpenID Connect, and SAML.¶
Note: This section is to be removed before publishing as an RFC.¶
Source for this draft and an issue tracker can be found at https://github.com/dickhardt/redirect-headers.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 9 July 2026.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Authentication and authorization protocols (OAuth [RFC6749], OpenID Connect [OIDC], SAML [SAML]) use browser redirects to navigate users between applications and authorization servers. These redirects must carry protocol parameters, which historically appear in URLs or POSTed forms.¶
This document addresses two distinct problems in redirect-based protocols:¶
Parameter Leakage: URL parameters leak sensitive data (authorization codes, tokens, session identifiers) through browser history, Referer headers, server logs, analytics systems, and JavaScript access. POST-based redirects expose parameters in DOM form fields. Both mechanisms make sensitive data visible to unintended parties.¶
Origin Verification: Current mechanisms for verifying the origin of redirects are unreliable. The Referer header may be stripped, rewritten, or removed by privacy tools and enterprise proxies, preventing reliable mutual authentication between parties.¶
This document defines two HTTP headers that address these problems:¶
A third header, Redirect-Path, allows servers to request path-specific origin verification when finer-grained validation is needed.¶
Note on independent use: While origin verification without parameter passing is theoretically possible (server sends Redirect-Path, browser responds with Redirect-Origin), no specific use cases have been identified for this configuration.¶
Incremental Deployment: A key feature of this specification is that deployment does not require coordination between parties. Each party (client application, browser, authorization server) can independently add support for Redirect Headers. Full functionality emerges naturally when all three parties support the mechanism, but partial deployment gracefully degrades to existing URL-based behavior. This allows for organic adoption without requiring synchronized upgrades across the ecosystem.¶
Three headers work together during top-level 303 redirects to provide secure parameter passing and mutual authentication:¶
Redirect-Query carries parameters from servers (client applications or authorization servers) to the browser, which then forwards them to the next party. This keeps sensitive data out of URLs while maintaining the redirect flow.¶
Redirect-Origin provides browser-verified origin authentication. The browser sets this header when forwarding redirect parameters, allowing the receiving party to verify where the redirect originated. This cannot be spoofed by scripts or stripped by intermediaries.¶
Redirect-Path (optional) allows servers to request path-specific origin verification for finer-grained validation within an origin.¶
Browser behavior: Only processes these headers during top-level redirects. Ignores them for normal requests or embedded resources.¶
The Redirect-Query header carries redirect parameters using URL query string encoding. It is set by servers (either the client application or authorization server) in redirect responses.¶
Redirect-Query: "code=SplxlOBe&state=123"¶
Properties:¶
The Redirect-Origin header provides browser-verified origin authentication. It is set ONLY by the browser and contains the origin (and optionally path) of the page from which the redirect originated.¶
Format: Always ends with /¶
Properties:¶
/ for consistent parsing¶
Browser behavior:¶
The browser sets Redirect-Origin when either Redirect-Query or Redirect-Path is present in the redirect response.¶
Current page: https://app.example/some/page¶
Server sends redirect:¶
HTTP/1.1 303 See Other Location: https://as.example/authorize Redirect-Query: "client_id=abc&state=123"¶
Browser forwards to AS:¶
GET /authorize Host: as.example Redirect-Origin: "https://app.example/" Redirect-Query: "client_id=abc&state=123"¶
The Redirect-Origin is set to the origin plus /, without any path component.¶
Current page: https://app.example/mobile/dashboard¶
Server sends redirect:¶
HTTP/1.1 303 See Other Location: https://as.example/authorize Redirect-Query: "client_id=abc&state=123" Redirect-Path: "/mobile/"¶
Browser validates path claim:
- Redirect-Path claim: /mobile/
- Current page path: /mobile/dashboard
- Validation: Does /mobile/dashboard start with /mobile/? ✓ YES¶
Browser forwards to AS:¶
GET /authorize Host: as.example Redirect-Origin: "https://app.example/mobile/" Redirect-Query: "client_id=abc&state=123"¶
The Redirect-Origin includes the validated path /mobile/ because the browser confirmed the current page is within that path.¶
If path validation fails:¶
If the current page was https://app.example/desktop/page and the server claimed Redirect-Path: "/mobile/", the browser would reject the path claim and send only the origin:¶
Redirect-Origin: "https://app.example/"¶
The Redirect-Path header allows a server to request path-specific origin verification. It is set by the server in the redirect response as a claim about the current page's path. The browser validates this claim and, if valid, includes the path in Redirect-Origin.¶
Format: Must start with /¶
Redirect-Path: "/app1"¶
Server behavior:¶
The server includes Redirect-Path in the redirect response when it wants the receiving party to know not just the origin, but also a specific path within that origin.¶
Browser validation:¶
Redirect-Path: "/api"¶
/api?¶
Redirect-Origin: "https://example.com/api/"¶
Redirect-Origin: "https://example.com/"¶
This mechanism prevents path manipulation attacks where an attacker might try to redirect from an unexpected path within the same origin. The server cannot lie about its path because the browser enforces validation.¶
Some protocols may wish to discover browser support for Redirect Headers using Client Hints [RFC8942].¶
Server advertises support:¶
Accept-CH: Redirect-Supported¶
Browser responds with capability:¶
Redirect-Supported: ?1¶
Note: Feature discovery is optional and not required for OAuth flows. The incremental deployment model works without explicit discovery - authorization servers detect support by receiving Redirect-Query headers in requests.¶
Redirect Headers is designed for incremental adoption - each party (client, browser, authorization server) can independently add support, with functionality emerging when all parties support it.¶
Clients can start sending parameters in both locations:¶
Browsers forward Redirect- headers when present:¶
Authorization Servers detect support and respond accordingly:¶
Each party adds support independently, in any order:¶
Clients add support by sending parameters in both the URL query string and the Redirect-Query header, and by looking for responses in the header while falling back to URL parameters.¶
Browsers add support by forwarding Redirect-* headers when present during redirects. No configuration is needed.¶
Authorization Servers add support by detecting when Redirect-Query is received (confirming that both the client and browser support it), then sending responses using only the Redirect-Query header and omitting URL parameters.¶
Result: Once all three parties support it, the authorization code is sent in the header rather than the URL.¶
No coordination required - each party adds support independently, and the system naturally converges to the secure behavior once all three support it. The client can immediately start sending both, browsers simply forward headers, and authorization servers detect support from incoming requests.¶
Scope: Redirect Headers specifically addresses OAuth and OIDC web-based redirect flows between websites where sensitive parameters are passed via URL query strings. This proposal does NOT address form_post mechanisms where data appears in the DOM, as that attack vector requires different mitigations.¶
Redirect-Query carries sensitive parameters (authorization codes, tokens, session identifiers) that MUST be protected with the same care as credentials. Servers MUST:¶
Network intermediaries (proxies, load balancers, CDNs) can observe header values in transit. Deployment environments with untrusted intermediaries require additional protection beyond this specification.¶
Browsers MUST enforce strict isolation of Redirect headers:¶
Failure to enforce these restrictions would allow malicious scripts to forge origin claims or steal sensitive parameters.¶
Redirect-Origin provides browser-mediated mutual authentication but has limitations:¶
Redirect-Path provides additional validation within an origin but cannot prevent attacks where the attacker controls a legitimate path within the same origin.¶
This specification assumes an honest browser implementation. It cannot protect against:¶
Servers should monitor for anomalous behavior (e.g., Redirect-Origin values that don't match expected patterns) as potential indicators of browser compromise or implementation bugs.¶
During incremental deployment, clients may send parameters in both URL and headers for backward compatibility. This dual-sending pattern preserves URL leakage risks until:¶
Servers SHOULD detect Redirect-Query presence and warn or reject requests that also include sensitive parameters in URLs, to encourage migration away from URL-based parameters.¶
When parameters remain in URLs (as during transition or with non-supporting implementations), sensitive data persists in browser history and may leak via Referer headers. Implementers should consider:¶
This specification does not eliminate all tracking vectors - cookies, browser fingerprinting, and other mechanisms remain unaffected.¶
Network intermediaries can still observe Redirect-* headers in transit, just as they can observe URL parameters today. This specification does not enhance privacy against network-level observers (ISPs, proxies, corporate firewalls). TLS remains essential for protecting parameters from network observation.¶
In some cases, moving parameters to headers may slightly improve privacy: unlike URL paths (which may be visible in TLS SNI or DNS queries), HTTP headers are encrypted by TLS and not visible to passive network observers.¶
Redirect-Origin explicitly reveals the origin (and optionally path) of the redirecting page. Implementers should consider:¶
Protocols using Redirect Headers should only be deployed where mutual knowledge of party identities is acceptable and expected (as in OAuth, where the AS and client already know each other).¶
Users have limited control over Redirect Headers:¶
Browser implementations SHOULD provide visibility into Redirect Headers in developer tools for transparency, while maintaining the security restriction that JavaScript cannot access them.¶
While Redirect Headers remove parameters from URLs (reducing accidental logging via URL-based logs), servers must implement appropriate logging controls:¶
The shift to headers does not automatically prevent logging - it requires conscious configuration changes.¶
This document registers four new HTTP header fields in the "Hypertext Transfer Protocol (HTTP) Field Name Registry" defined in [RFC9110].¶
Header field name: Redirect-Query¶
Applicable protocol: http¶
Status: standard¶
Author/Change controller: IETF¶
Specification document(s): [this document]¶
Header field name: Redirect-Origin¶
Applicable protocol: http¶
Status: standard¶
Author/Change controller: IETF¶
Specification document(s): [this document]¶
Note to RFC Editor: Please remove this section before publication.¶
Specification status: Exploratory draft¶
Browser support: Not yet implemented (proposed specification)¶
Server support: Reference implementations needed¶
This specification requires:¶
Deployment strategy: Backward compatible - clients send both URL and headers during transition.¶
This appendix provides a detailed comparison of OAuth flows with and without Redirect Headers to illustrate the differences in security and functionality.¶
Client Website returns to Browser:¶
HTTP/1.1 303 See Other Location: https://as.example/authorize?client_id=abc&state=123&redirect_uri=...¶
Browser navigates, sends to AS:¶
GET /authorize?client_id=abc&state=123&redirect_uri=... Host: as.example Referer: https://app.example/login¶
The Referer header is unreliable and may be stripped by browsers or proxies.¶
AS returns code to Browser:¶
HTTP/1.1 303 See Other Location: https://app.example/cb?code=SplxlOBe&state=123¶
The authorization code is now exposed in the URL.¶
Browser sends code to Client Website:¶
GET /cb?code=SplxlOBe&state=123 Host: app.example Referer: https://as.example/consent¶
The authorization code is stored in browser history, server logs, and analytics systems. Third-party resources loaded by this page will receive the code via the Referer header.¶
Problems:¶
Client Website returns to Browser:¶
HTTP/1.1 303 See Other Location: https://as.example/authorize Redirect-Query: "client_id=abc&state=123&redirect_uri=https://app.example/portal/callback" Redirect-Path: "/portal/"¶
Browser validates and adds origin:¶
The browser validates the Redirect-Path claim against the current page URL. In this example, the current page is https://app.example/portal/login and the Redirect-Path claim is /portal/. Since the page path starts with /portal/, validation succeeds and the browser sets Redirect-Origin to https://app.example/portal/.¶
Browser navigates, sends to AS:¶
GET /authorize Host: as.example Redirect-Origin: "https://app.example/portal/" Redirect-Query: "client_id=abc&state=123&redirect_uri=https://app.example/portal/callback"¶
The Redirect-Origin is browser-supplied and cannot be spoofed. Parameters are transmitted in headers, not in the URL.¶
AS validates and returns to Browser:¶
The AS verifies that Redirect-Origin is https://app.example/portal/ and that the redirect_uri starts with https://app.example/portal/.¶
HTTP/1.1 303 See Other Location: https://app.example/portal/callback Redirect-Query: "code=SplxlOBe&state=123"¶
The authorization code is transmitted in the header. No parameters appear in the URL.¶
Browser forwards back to Client Website:¶
The browser is now on the AS consent page at https://as.example/consent. Since Redirect-Query is present in the response, the browser sets Redirect-Origin to https://as.example/.¶
GET /portal/callback Host: app.example Redirect-Origin: "https://as.example/" Redirect-Query: "code=SplxlOBe&state=123"¶
The URL is clean with no query parameters. The client verifies that Redirect-Origin matches the expected AS. The authorization code never appears in the URL, browser history, or Referer headers.¶
Benefits:¶
Requirements:¶
The authors would like to thank early reviewers for their valuable feedback and insights that helped shape this proposal: Jonas Primbs, Warren Parad.¶