> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.divert.ly/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.divert.ly/_mcp/server.

# Routes

> Routes are the paths under a domain that send traffic to targets. Fields, targeting strategies, fallbacks, and QR codes.

A route is a path under a domain — the `/spring` in `go.acme.com/spring` — that points to one or more targets. Every route belongs to one domain, and its path must be unique within that domain.

![A route's detail page, showing its fields, QR code, and performance](file:docs/assets/route-detail-homepage.jpg "Route detail page")

## Fields

| Field              | Description                                                                                                                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Path               | The path segment after the domain, such as `/spring` or `/cool-dogs`. Only letters, numbers, hyphens, and slashes are allowed. Use the dice icon next to the field to generate a random one. |
| Nickname           | A short, friendly name to help you find the route later.                                                                                                                                     |
| Description        | Longer, free-form notes about what the route is for.                                                                                                                                         |
| Enabled            | Whether the route currently resolves. Disabling a route stops it from routing without deleting it.                                                                                           |
| Targeting Strategy | How the route chooses which target handles a given request. See below.                                                                                                                       |
| Targeting Fallback | What happens when no target matches the strategy: `Error`, or `Resolve` to a default target.                                                                                                 |
| Default Target     | The target used when the fallback is `Resolve`.                                                                                                                                              |

## Targeting strategies

A route's targeting strategy decides which of its targets handles a given request. **Weighted** and **Random** are available on every plan, including Free. All the other strategies are available on paid plans. For the exact rules, including what happens when several targets match or none do, see [Target Selection](/docs/concepts/target-selection).

| Strategy         | Chooses a target based on                                                                                                                           |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Weighted         | A relative weight set on each target.                                                                                                               |
| Random           | Nothing — targets are chosen at random, roughly evenly over time. This is the default.                                                              |
| Country          | The visitor's country.                                                                                                                              |
| Device Type      | The visitor's device.                                                                                                                               |
| Operating System | The visitor's operating system.                                                                                                                     |
| Language         | The visitor's browser language.                                                                                                                     |
| Browser          | The visitor's browser.                                                                                                                              |
| Human            | Whether the request looks like it came from a person or from automated traffic. See [Redirect Bot Traffic](/docs/user-guides/redirect-bot-traffic). |
| Header           | The value of a request header you name.                                                                                                             |
| Query String     | The value of a query-string parameter you name.                                                                                                     |
| IP CIDR          | Whether the visitor's IP address falls inside a range you specify.                                                                                  |
| User Agent       | The visitor's user-agent string.                                                                                                                    |

![The Targeting Strategy dropdown on the Create New Route form, showing the full list of strategies](file:docs/assets/route-create-strategy-dropdown.jpg "Targeting Strategy options")

Two of these — **Header** and **Query String** — need one more piece of route-level configuration: a **Targeting Selector**, the specific header name or query-string parameter to inspect. The other strategies don't need this, because there's nothing to name — a Country-strategy route always checks the visitor's country, for instance.

Once you've picked a strategy, add [targets](/docs/concepts/targets) to the route to supply the actual matching values.

## QR codes

Generate a QR code for a route from its detail page. A route can have one QR code at a time; delete it and generate a new one if you need to start over.

![The confirmation dialog for generating a QR code](file:docs/assets/route-qr-generate-modal.jpg "Generate QR Code")

## Metrics and risk

Every route's page shows its traffic over time and, if anything about it has been flagged, a risk notice. See [Metrics](/docs/concepts/metrics) and [Security & Risk](/docs/concepts/security-risk).