Features
Redirect hosts
A redirect host answers requests for its domains with a redirect (301, 302, 307 or 308) instead of forwarding them to a backend. Use it to move an old domain to a new one, or to send the bare domain to the www address.
Where to create one
Open Redirects in the top menu and click Add Redirect. The list shows the source domains, the target, the code and the status.

Settings
| Field | Meaning | Default |
|---|---|---|
| Domain Names (one per line) | The source domains to redirect | none |
| Scheme | The protocol of the target address. Auto keeps the protocol the request came in with (http or https). | Auto |
| Target Domain | Hostname or IP to redirect to. A port can be added, as in :8443. | none |
| Redirect Code | 301 (Permanent), 302 (Found), 307 (Temporary), 308 (Permanent) | 301 |
| Forward Path | A path appended after the target domain. Must start with /. | empty |
| Preserve original path | Appends the request's path and query string to the target address. | on |
| Enable SSL | Accepts HTTPS on the source domains. Choose the certificate under Select Certificate. | off |
| Force HTTPS | HTTP requests to a source domain are first sent to HTTPS on the same domain. | off |
| Enabled | When off, this redirect is left out of the nginx configuration. | on |
| Block Exploits | Blocks known attack patterns (the exploit block rules). | off |
How the target address is built
The target is scheme://target domain + forward path + (when Preserve original path is on) the request path.
| Request | Settings | Location in the response |
|---|---|---|
https://old.example.com/blog?p=1 | Scheme Auto, target new.example.com, preserve path on | https://new.example.com/blog?p=1 |
http://old.example.com/blog | Scheme HTTPS, target new.example.com, forward path /archive, preserve path on | https://new.example.com/archive/blog |
https://old.example.com/anything | Scheme HTTPS, target new.example.com, preserve path off | https://new.example.com |
The forward path and the original path are joined as they are, so do not end the forward path with /.
HTTPS
- With Enable SSL on and a certificate chosen, the source domains also accept HTTPS. Issue the certificate first under SSL certificates.
- A redirect host with SSL also answers over HTTP/2 and HTTP/3 (QUIC). There is no separate toggle.
- If no certificate is assigned or its files do not exist yet, the configuration is HTTP-only until they do.
/.well-known/acme-challenge/on the source domains is answered by NPG instead of being redirected, so Let's Encrypt HTTP-01 issuance and renewal work.
Interaction with other features
- The WAF does not apply to redirect hosts, and they have none of the Security tab features such as GeoIP restriction, access lists or the bot filter. Block Exploits is the only protection you can turn on.
- The global Fail2ban does not count requests for domains configured as redirect hosts.
- A certificate used by a redirect host cannot be deleted; unassign it from the redirect host first.
- Sync All Configs in the top bar regenerates the redirect hosts as well.
Limits
- There are no per-path redirect rules; a host sends everything to one target. For per-path redirects, write
locationandreturnon the Advanced tab of a proxy host. - The target domain cannot contain a wildcard.
- The forward path cannot contain whitespace,
;,{,},$, quotes or backslashes.