Create Redirection Host
create_redirection_hostCreate an Nginx Proxy Manager host that redirects domains to a destination URL with a chosen HTTP status (301, 302, 307, 308). Use it for URL redirection; preview with dry_run before applying.
Instructions
Create a host that redirects requests for domains to a destination using the selected HTTP status. Use this for URL redirection; use create_proxy_host to forward requests to an upstream server. NPM stores the redirect configuration; an attached certificate ID is referenced without requesting a certificate. Returns the created host object with its ID and redirect settings. Set dry_run=True to preview the exact request without changing NPM.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | When True, return the exact request preview without changing NPM. | |
| ssl_forced | No | Whether NPM redirects HTTP requests to HTTPS. | |
| domain_names | Yes | Domain names routed by this host or certificate. | |
| preserve_path | No | Whether to preserve the original request path in the redirect. | |
| block_exploits | No | Whether NPM enables its exploit-blocking option. | |
| certificate_id | No | NPM certificate ID to attach; omit for no certificate. | |
| forward_scheme | No | Scheme of the redirect destination: http or https. | https |
| forward_http_code | No | HTTP redirect status: 301, 302, 307, or 308. | |
| forward_domain_name | Yes | Destination hostname or URL for redirected requests. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||