Skip to main content

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:

OptionDescription
HTTPS RedirectWhen enabled, HTTP requests are automatically redirected to HTTPS
Rewrite Context PathWhen 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:

TypeDescription
Application ComponentRoutes traffic to an Application Component managed by CodeNOW, deployed in a specific environment
Custom ServiceRoutes traffic to any Kubernetes service running in the cluster, regardless of whether it is managed by CodeNOW