> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cnap.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# External Access

> Expose your applications to the internet with custom domains or preview URLs

CNAP provides multiple ways to make your applications accessible from outside the cluster. All options use <Tooltip headline="HTTPRoute" tip="An HTTPRoute is a Gateway API resource that matches incoming HTTP requests by hostname and path, then routes them to a Kubernetes Service.">HTTPRoutes</Tooltip> on the cluster to define routing rules — the difference is how traffic reaches your workers and who manages DNS.

Choose the approach that fits your setup:

<CardGroup cols={1}>
  <Card title="Preview Domains" icon="globe" href="/networking/preview-domains">
    Instant `*.cnap.app` URL for every deployment — no DNS, no certificates, no configuration.
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Direct IP" icon="server" href="/networking/direct-ip">
    Point your domain's DNS at your worker nodes. Full control over routing and TLS.
  </Card>

  <Card title="Cloudflare Tunnel" icon="cloud" href="/networking/cloudflare-tunnel">
    Route through Cloudflare's network. No public IPs or firewall rules needed.
  </Card>
</CardGroup>

## Comparison

|                        | Direct IP                             | Cloudflare Tunnel                            | Preview Domains                      |
| ---------------------- | ------------------------------------- | -------------------------------------------- | ------------------------------------ |
| **Public IP required** | Yes                                   | No                                           | No                                   |
| **DNS setup**          | You manage A records                  | You set a CNAME                              | Automatic                            |
| **TLS**                | Bring your own                        | Cloudflare Edge                              | Automatic                            |
| **Best for**           | Full control, existing infrastructure | Production custom domains without public IPs | Development, demos, quick sharing    |
| **Traffic path**       | DNS → Worker node → App               | DNS → Cloudflare Edge → Tunnel → App         | DNS → Cloudflare Edge → Tunnel → App |

## How routing works

All three options use <Tooltip headline="Gateway API" tip="Gateway API is the Kubernetes standard for managing external traffic routing. It replaces older Ingress resources with a more expressive, role-oriented model.">Gateway API</Tooltip> resources on the cluster. When you expose a hostname, an HTTPRoute is created that defines the routing rule. A controller on the cluster detects the route and configures the appropriate gateway — whether that's a Cloudflare Tunnel or a direct IP gateway like Cilium.

Because routing is defined through standard Kubernetes resources, it works with GitOps tools like Flux and ArgoCD, custom Helm charts, and `kubectl apply`.

For apps deployed from Docker images or GitHub repositories, CNAP automates the routing setup — toggle **Expose externally** on a port, enter a hostname, and the [generic application chart](/tools/generic-chart) creates the HTTPRoute for you. Apps deployed from custom Helm charts can create HTTPRoutes through the chart's own values.

## Related topics

* [Generic application chart →](/tools/generic-chart) — How CNAP packages and deploys applications
* [Import a cluster →](/clusters/import) — Connect your existing Kubernetes cluster
* [Regions →](/clusters/regions) — Organize clusters for customer selection
