Path & Query Preservation on Edge Redirects Explained
Control whether myapp.makes.fyi/pricing?ref=gh redirects to https://target.com/pricing?ref=gh or collapses to the target root.
Exact DNS wire fields: HOST identifies the label, TYPE picks the record format, TTL sets cache duration, TARGET holds the answer.
1. Engineering Breakdown
By default, set_forward keeps preserve_path: true so deep links and query strings stay intact. Set preserve_path: false to send every path to one landing page.
Common Pitfalls
- Skip
cloak: truefor modern apps. Most sites sendX-Frame-Options: DENYheaders that block iframes.
2. Interactive DNS Record Syntax Validator
Edit the record type, host label, or value below to validate syntax and build your CLI command.
3. Exact CLI, curl & MCP JSON-RPC Payloads
Pick your preferred interface below and copy the working payload.
agentdomains forward myapp https://docs.example.com
curl -X PUT https://api.agentdomains.co/v1/subdomains/myapp/forward \
-H "Authorization: Bearer $AGENTDOMAINS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"target":"https://docs.example.com","permanent":false,"preserve_path":true}'
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "set_forward",
"arguments": {
"label": "myapp",
"target": "https://docs.example.com",
"preserve_path": true
}
}
}
Frequently asked questions
What is Path-Preserving Redirect?
Control whether myapp.makes.fyi/pricing?ref=gh redirects to https://target.com/pricing?ref=gh or collapses to the target root.
How do I automate Path & Query Preservation on Edge Redirects with AgentDomains?
Use the Go CLI snippet above, send a REST curl call, or invoke set_forward on https://mcp.agentdomains.co.
Related DNS & SSL Guides
Reverse Proxy vs URL Forwarding
Reverse proxy (set_proxy) serves your origin under your domain with HTTPS. URL forwarding (set_forward) sends a 301 or 302 redirect.
301 vs 302 HTTP Redirects
302 is temporary and easy to change (our default). 301 is permanent and browsers cache it hard.
Edge RoutingCloudflare Edge TLS & HTTPS
See how set_proxy handles TLS 1.3 at the edge and forwards traffic to your origin hostname.
CORS Behind a Reverse Proxy
Configure Access-Control-Allow-Origin and OPTIONS preflight handling cleanly when your API sits behind an edge reverse proxy.
Claim your agent domain now
Start with 10 free HTTPS domains under agentdomains.co or makes.fyi for 30 days. Upgrade to Pro for $10/year to keep up to 100 names with visitor stats.