DNS Overrides
Send a hostname’s traffic to another IP address. The Host header and the TLS server name keep the original hostname, so the server handles the request as usual. Use it to test a client against a staging server or a local build.
apxy dns set --host api.example.com --ip 10.0.0.5
apxy dns list
apxy dns remove --host api.example.comOverrides take effect at once on the running proxy. They apply to decrypted and tunneled connections.
Wildcards
apxy dns set --host "*.staging.example.com" --ip 10.0.0.6An exact hostname wins over a wildcard. Among wildcards, the longest one wins.
Good to know
- Overrides persist across proxy restarts. Remove them when you are done.
- APXY still checks the server’s certificate against the original hostname. See SSL Errors.
- Overrides are refused when the proxy runs with
--upstream-proxy, because the upstream proxy resolves hostnames. - To change the URL instead of the IP address, use URL Redirects.
Reference
For all flags, see CLI Reference → DNS. AI agents can use the set_dns_override, list_dns_overrides, and remove_dns_override MCP tools.
Last updated on