An HTTP forwarding rule selects incoming requests and returns a redirect to an absolute HTTP or HTTPS destination. Preview representative URLs before saving the rule, then verify the deployed result. A DNS record alone cannot redirect a URL path.
| Method | Resource | Scope | Idempotency-Key |
|---|---|---|---|
POST |
/v2/forwarding/http-rules/preview |
forwarding:http |
Required |
POST |
/v2/forwarding/domains/{domainId}/http-rules |
forwarding:http |
Required |
PATCH |
/v2/forwarding/http-rules/{ruleId} |
forwarding:http |
Required |
DELETE |
/v2/forwarding/http-rules/{ruleId} |
forwarding:http |
Required |
01 Define the intended transformation
Choose which source host should match: the apex, www, both or a supported wildcard. Decide whether the incoming path and query string should be kept. Record expected results for the home page, a deep path, a query-string URL and an unmatched path.
Send destination_url, status_code, matching settings, path_mode, query_policy, source_host_mode, priority and enabled deliberately. The default code is 301. A temporary code can be more appropriate during testing when you do not want clients retaining a permanent move.
02 Preview, save and test
- POST to the preview resource with the owned
forwarding_domain_idand asample_url, together with the proposed rule settings. - Inspect the simulated status and destination. Repeat with the other representative paths and queries.
- List existing rules and check their priority, host selectors and destinations. Avoid duplicate rules or a redirect chain that eventually returns to the source.
- Create the rule under the forwarding domain. For an edit, PATCH the rule ID with the intended destination and settings; use the current
If-Matchversion where appropriate. - Deploy through the forwarding workflow and test actual HTTP and HTTPS responses for every source hostname.
Common questions
Does loop_check passed prove every destination is safe?
It reports the checks and simulation performed for the submitted configuration. It is not a complete audit of all externally deployed redirects. Follow the live chain after deployment.
Can I use regular expressions?
Regex routing is not supported by this workflow. Use supported path matching or the destination application's own routing when more complex behaviour is required.
Will PATCH keep every omitted setting?
Send the complete intended rule settings. The shared normalisation applies defaults to this route, so a minimal destination-only edit can produce different settings from the existing rule.
Before deleting a rule, check bookmarked paths, campaign links and application callbacks that still depend on it. Confirm deployment of the removal as well as the API response.