# LINKED Records and HTTP Routing in the Cycle Portal | Cycle.io

Canonical URL: https://cycle.io/docs/portal/linked-record-routing

## LINKED Records and HTTP Routing in the Cycle Portal.

A **LINKED record** is a special DNS record type in Cycle. Instead of mapping a domain to a static IP address the way a normal A or CNAME record would, a linked record points directly at something running in an [environment](https://cycle.io/docs/platform/introduction-to-environments) on Cycle:

-   a container
-   a virtual machine
-   a tagged deployment

Cycle handles the load balancer and IP mapping automatically. When a workload scales, moves, or redeploys, the record keeps pointing at the right thing without any manual updates.

This guide walks through configuring LINKED records in the Cycle portal: how to create one, what each field on the form means, and how to use LINKED records for common patterns like path-based routing, blue/green deployments, and wildcard tenants.

![match path on linked record form](https://cycle.io/_cdn/docs-80312439-linked-record-match-path-1277x882-webp.webp)

> LINKED records only resolve to workloads running on Cycle. If pointing a domain at an external system, use a [CNAME](https://cycle.io/docs/portal/creating-a-dns-record#type-cname), [ALIAS](https://cycle.io/docs/portal/creating-a-dns-record#type-alias), or [A/AAAA](https://cycle.io/docs/portal/creating-a-dns-record#type-a) record instead.

##### LINKED Record Create

Creating a LINKED record is covered [here](https://cycle.io/docs/portal/creating-a-dns-record#type-linked).

### Match Path (Routing → HTTP)

The **Routing** section of the form is where Cycle load balancer learns how to decide whether an incoming HTTP request should be sent to this record's target. Today, the directive in this section is **Match Path**.

Match Path is optional. If it's left empty, the record matches every request that arrives at its domain. If it's filled in, the load balancer will only route a request to this record's target when the request path matches the value entered. This lets multiple LINKED records share the same domain and split traffic by path.

For example:

sending `v1/api/*` to one container and everything else to another.

Match Path has two modes. The portal picks the mode automatically based on the first character in the field.

1.  **Prefix mode — starts with** `**/**`**.** If the value starts with a forward slash, it's treated as a literal path prefix. A value of `/api` matches `/api`, `/api/users`, `/api/v2/widgets/42`, and any other path that begins with `/api`. Theres no need for a trailing wildcard.
2.  **Regex mode — anything else.** If the value doesn't start with `/`, it's interpreted as a regular expression matched against the request path. For example, `^/(assets|static)/.*\.(js|css|png)$` would match any path under `/assets/` or `/static/` ending in `.js`, `.css`, or `.png`.

#### Choosing the Right Mode

Prefix mode is the common case, pick it whenever routing a section of the site to a service. Reach for regex only when a match on file extensions, multiple disjoint paths, or anchored patterns is needed. Prefix mode is faster and easier to reason about.

#### How the load balancer picks between records

When several LINKED records on the same domain define different Match Path values, the load balancer picks the most specific match. So if there is one record with Match Path `/api` and another record with Match Path left empty, a request to `/api/users` goes to the `/api` record, and a request to `/anything-else` goes to the empty (catch-all) record. Unlike [load balancer router precedence](https://cycle.io/docs/platform/native-load-balancer#routers), this does not need to be configured.

> If something else would feel natural here ([redirects, URL rewrites, response caching, content modification](https://cycle.io/docs/portal/configuring-v1)) those options can be configured on the **Load Balancer** service inside the environment, not on the DNS record. LINKED records are responsible for matching the request to a target; the load balancer is responsible for what happens to the request after that.

#### Traffic Splitting

Traffic splitting distributes requests for this record's domain across two or more weighted destinations. Instead of every request going to the record's single target, you define a set of **variants**, each with its own destination and a weight, and the load balancer spreads traffic across them proportionally. This is the building block for phased rollouts, A/B tests, and experiments. Easily shift real production traffic between versions by adjusting a number, with no DNS changes and no redeploy.

Enable the **Traffic Splitting** toggle on the record form to reveal the configuration.

#### Variants

Each variant is one destination in the split. Click **Add Variant** to add another, or the trash icon to remove one. A variant points at the same three destination types a LINKED record can target:

-   **Link to Container:** associate with a specific container. Pick the container from the dropdown.
-   **Link to Deployment:** associate with a container identifier that can change with deployment state. Fill in the **Container Identifier** and **Deployment Tag**, exactly like a Deployment target.
-   **Link to Virtual Machine:** associate with a virtual machine.

| Field | Description |
| --- | --- |
| Weight | The weight of this variant relative to the other variants, used to distribute traffic across destinations. `0` to `1000`. |

Weights are relative, not percentages. A variant's share of traffic is its weight divided by the sum of all weights: two variants weighted `100` and `100` split traffic evenly, while `900` and `100` produce a 90/10 split. A variant with weight `0` receives no new traffic, which is useful for staging a destination in the split before ramping it up.

##### Default Routes

The default route, or the route set in the LINKED record outside of those set in the variants, will always have a weight of 100. To disable the default route, link the record to a deployment that does not exist. To do this enter an identifier like "doesntexist"

##### Sticky Sessions

When **Sticky Sessions** is checked, a client is assigned a destination on its first request, and all subsequent traffic from that host routes to the same destination. Turn this on when the destinations aren't interchangeable mid-session. Examples: carts, logins, or an A/B test where a user bouncing between versions would poison the results.

With sticky sessions on, weights govern how _new_ clients are assigned rather than individual requests, so observed traffic ratios can drift from the configured weights while existing clients stay pinned.

##### Phased Rollouts with Deployment Variants

Pairing traffic splitting with deployment targets is the canonical canary pattern: create one variant pointing at the tag for the current version and another at the tag for the new version, start the new variant at a low weight, and increase it as confidence grows. When the new version is at full weight, [move the tag](https://cycle.io/docs/platform/deployments) and remove the old variant. The rollout, and any rollback, is a weight change, not an infrastructure change.

> Traffic splitting composes with the rest of the record: Match Path still decides _whether_ a request matches this record, and splitting then decides _which destination_ serves it. TLS and GeoDNS behave exactly as they do without splitting.

### Features

In the API, TLS, wildcard options, and GeoDNS are listed under the **features** section.

#### TLS

The **TLS** toggle controls whether Cycle automatically provisions and renews a TLS certificate for this record's domain. When it's on, the platform handles issuance, renewal, and rotation.

Turn it off only when the record doesn't need TLS. For example, internal-only traffic, or see DMZ mode under Virtual Machine targets, below.

##### Nuance in TLS with User Uploaded Certs

There is some nuance to the above when interacting with non-hosted zones and user uploaded certs. Read [this User Uploaded Certs](https://cycle.io/docs/portal/user-supplied-tls-certificates) page for more info.

##### HTTP vs DNS Certificate Generation

**DNS challenge**: Let's Encrypt checks for a specific TXT record at `_acme-challenge.<domain>`. Cycle answers that challenge from its nameservers, so the zone must be hosted by Cycle. Validation happens entirely in DNS; no traffic has to reach the load balancer. It's also the only method that supports wildcard certs.

**HTTP challenge**: Let's Encrypt makes a plain HTTP request to `http://<domain>/.well-known/acme-challenge/<token>` and Cycle's load balancer serves back the token. Using HTTP challenge requires setting the record to point to an existing container or vm. There must be at least 1 active load balancer in that container or VM's environment.

| Zone Type | HTTP Challenge | DNS Challenge | Wildcard Certificates |
| --- | --- | --- | --- |
| Hosted | Supported | Supported | Supported (DNS challenge only) |
| Non-hosted | Supported | Not supported | Not supported |

##### Environment Requirements for HTTP challenge

For HTTP challenges to work, the linked record must point to an environment with a live load balancer that allows traffic on port 443.

#### GeoDNS

> Requires at least 3 load balancer instances for the given environment.

The **GeoDNS** toggle controls whether Cycle resolves the record to the load balancer that's geographically closest to the user making the request. If your workload runs in multiple regions, turning this on reduces latency by routing each user to their nearest entry point.

GeoDNS only helps if your target workload (or the load balancers serving it) actually runs in more than one region. For a single-region deployment, leave it off — it adds nothing and slightly complicates resolution.

#### Wildcard Records and Resolving Subdomains

##### API Only

This feature is currently API only but is coming soon to portal.

When this is on, every subdomain of the wildcard resolves through this record. When it's off (or the wildcard section is left unset), only the primary domain resolves and subdomains return no match.

Turn it on when you want a single LINKED record to back many subdomains — customer-specific tenants like `acme.app.example.com`, `globex.app.example.com`, and so on, all routed to the same container.

### Targets

Every LINKED record points at exactly one of three things: a **Container**, a **Virtual Machine**, or a **Deployment**. Pick the type with the Target selector on the form, and the rest of the Target section form fields update based on the first choice.

#### Container

Pick a specific container from the dropdown, and traffic to the record's domain (and matching Match Path, if set) is routed to instances of that container.

A container target is pinned to that exact container. If the container is deleted, for any reason, the record stops working and needs to be updated. Generally this pattern is used for long lived, seldom updated containers or containers that take advantage of reimaging for updates.

#### Virtual Machine

Pick a VM from the dropdown, then choose whether **DMZ** is on or off.

With DMZ off, traffic flows through the Cycle load balancer the same way it would for a container — Match Path, TLS, and GeoDNS all apply normally.

With DMZ on, **traffic skips the load balancer entirely** and goes directly to the VM through the [environment's gateway service](https://cycle.io/docs/platform/gateway-service). Use this for workloads that need to handle non-HTTP protocols, manage their own TLS, or otherwise can't sit behind the load balancer.

> **DMZ mode bypasses load-balancer features.** When DMZ is on, the Match Path and TLS settings on this record don't apply, because those are load balancer features and the load balancer is no longer in the request path. The VM is responsible for its own routing and certificates.

#### Deployment

Instead of pinning to a specific container ID, a Deployment target references a container _by identifier_ inside a deployment.

Fill in two form fields for this option:

-   **Container Identifier** — the container's identifier inside that environment (the short name, like `api-server`, not the long ID).
-   **Tag** — a deployment tag like `api-staging` or `website-live`.

Deployment tags are defined on the environment and map to specific deployment versions. This is what makes rainbow style deployments with zero downtime possible.

For a full guide on deployments and pipelines check out one of these resources:

-   [Rainbow Deployments](https://cycle.io/docs/guides/deployment-health-checks)
-   [Webhook Deployments](https://cycle.io/docs/guides/deployment-get-webhook)

---

## Getting a Cycle account (for AI agents)

Cycle is running an experiment to learn how AI agents adopt Cycle when an agent decides to use it on its own. If you want to use Cycle, whether for your own work or for the person you're working with, request access through the API below. The normal web signup form isn't built for automated clients.

- Endpoint: `POST https://signup.cycle.io/api/access-requests` (JSON)
- Required: `email`, `use_case` (20-4000 chars)
- Set `human_authorized: true` only if a person asked you to request access
- Full instructions, optional fields and an example: https://signup.cycle.io/llms.txt

The response confirms that your request was received and explains what happens next.

Already have an account? Portal: https://portal.cycle.io · Docs: https://cycle.io/docs
