Routing Rules
Routing rules define how incoming HTTP(S) traffic on a domain is forwarded to its destination. They can be configured when creating a domain or at any time afterwards via the Edit action on the domain. Each rule matches a URL path prefix and routes matching requests to a specific backend.
Rules are evaluated in order using prefix-based first match — the first rule whose prefix matches the incoming request path is applied. Order matters: more specific prefixes (e.g. /api) should be placed before broader ones (e.g. /).
Rule Options
Every routing rule has two common options regardless of the destination type:
| Option | Description |
|---|---|
| HTTPS Redirect | When enabled, HTTP requests are automatically redirected to HTTPS |
| Rewrite Context Path | When enabled, the matched path prefix is stripped (or replaced) before the request is forwarded to the destination |
Destination Types
There are two types of destinations a routing rule can target:
| Type | Description |
|---|---|
| Application Component | Routes traffic to an Application Component managed by CodeNOW, deployed in a specific environment |
| Custom Service | Routes traffic to any Kubernetes service running in the cluster, regardless of whether it is managed by CodeNOW |