Skip to content

RedirectHost

Issues HTTP redirects.

Field Type Required Notes
domains []string yes Source hostnames.
targetDomain string yes Where to redirect.
targetScheme string no http | https | auto. Unset behaves as auto, which mirrors the scheme the request arrived on.
statusCode int no 301 | 302 | 307 | 308. Unset (or 0) sends 301.
preservePath bool no Keep the request path.
tls TLSSettings no Same shape as ProxyHost tls: certificateRef, forceSSL, minTLSVersion, hsts.* and clientAuth.* all apply. Note certificateRef is an intent record here too: the served certificate is selected by SNI.
name: apex
domains: [example.com]
targetDomain: www.example.com
statusCode: 301
preservePath: true