# Mobile testing

> Test your dev build on a real iPhone or Android device over real HTTPS.

`localhost` only exists on the machine it runs on, so a phone cannot reach your
dev server through it. Expose the route and the device gets a real HTTPS URL.

## Expose the dev server

Configure a public server first using
[Exposing publicly](/docs/getting-started/exposing-publicly).

```bash
routeup serve example-app --port 3000 --expose
```

This example assumes your saved token allows `*.team.routeup.dev`.

```txt frame="terminal" title="terminal"
route: example-app
local: https://example-app.localhost
public: https://example-app.team.routeup.dev
expose: all paths
targets:
  /        http://localhost:3000

requests: live
press Ctrl-C to stop
```

## Open it on the device

Open the public URL in Safari or Chrome. No local profile or CA installation is
needed because the public certificate is publicly trusted.

Because it is a publicly trusted HTTPS origin, it exercises secure-context
features such as service workers, `getUserMedia`, secure cookies, and the
clipboard API. Hostname, cookie-domain, and cross-site behavior can still differ
from production.

## Why not local for this

A `*.localhost` route is the zero-network path, but it resolves to `127.0.0.1` on
each machine and is unreachable from a separate device. Mobile testing needs the
public route. (Same-LAN shortcuts like mDNS are a possible future addition, but
today off-host devices go through the public server.)

## Tip: keep the URL stable

Bookmark the named public URL. The configured route and namespace let you request
the same URL each run instead of receiving a new random URL; claims remain
subject to the server's normal conflict rules.
