In this example old.example.com is retired and every request should go to https://example.com with the same path and query: old.example.com/a/b?x=1 → https://example.com/a/b?x=1.
Make sure the name is proxied. The edge only answers names that have a proxied DNS record (A, AAAA or CNAME with the proxy on). If every path redirects, the record's content is never used, so it can point to the same origin as the apex.
Add the rule.
Open the domain and go to Rules → Redirects → Add redirect. Set Name to
old.example.com, Path prefix to/, Destination URL tohttps://example.com, Status to301 · Permanent, keep Keep the rest of the path and Keep the query string on, and click Apply. Then save the change with a reason.openwaf-cloud ctl zones set example.com \ redirects:='[{"host":"old.example.com","target":"https://example.com"}]' \ --reason "Retire old.example.com"redirectsreplaces the whole list: include the rules you already have (zones show example.comlists them).curl -sS -X PATCH "https://dash.openwaf.dev/v1/orgs/$ORG/zones/example.com/edge" \ -H "Authorization: Bearer $OPENWAF_TOKEN" \ -H "X-Change-Reason: Retire old.example.com" \ -H "Content-Type: application/json" \ -d '{"redirects": [{"host": "old.example.com", "target": "https://example.com"}]}'update_settingswith{"zone": "example.com", "settings": {"redirects": [{"host": "old.example.com", "target": "https://example.com"}]}, "reason": "…"}. Simulate, then confirm.Test it.
curl -sI https://old.example.com/a/b?x=1HTTP/2 301 location: https://example.com/a/b?x=1
Next: how redirect rules match, and the fields you can set.