# Configure Docker domains and ports

> Route a Docker app through an HTTPS domain or allocate a direct public port.

Docker networking maps a public route to the internal port where the application listens.

## Link a domain first

For an HTTPS route, open the service-level **Domains** tab, add the external domain, publish the ownership TXT record, and click **Verify Ownership**. The domain then becomes selectable inside the app's port-route form.

## Add a proxied HTTPS route

1. Open **Apps → your app → Configuration**.
2. Under **Ports**, click **Add Port Route**.
3. Enter the internal target port. Use the detected exposed-port suggestions only if they match the process configuration.
4. Enable proxy routing.
5. Select a verified domain.
6. Add the A record displayed by AppLaunch.
7. Set Cloudflare to **DNS only**, wait for propagation, and run the DNS verification action.
8. Click **Create Route**.

AppLaunch terminates HTTPS on port 443 and forwards requests to the internal target port. The application still must listen on `0.0.0.0:TARGET_PORT`.

## Add a direct public port

Use the same **Add Port Route** flow but leave proxy routing disabled. AppLaunch allocates a public port and forwards the selected protocol to the internal target port. Connect with the displayed hostname and allocated port.

Use a direct port for protocols that are not HTTP or when the client expects a port number. Use a proxied domain for normal websites and HTTP APIs.

## Remove a route

Select **Remove** beside the route and wait until its status finishes changing. Removing a route stops new public connections but does not delete the app. Update DNS and third-party integrations after removal.

## Troubleshoot routing

- **502 or unavailable:** confirm the app is running and listening on the exact target port.
- **DNS verification fails:** remove conflicting records, disable Cloudflare proxying, and wait for propagation.
- **Connection refused on direct port:** confirm protocol, allocated public port, node status, and application bind address.
- **Route limit reached:** remove an unused route or change the service plan; do not create duplicate apps.

See [Troubleshoot domains and DNS](/domains/troubleshooting/) for DNS-specific checks.
