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

> ## Agent Instructions
> Agents: start with https://docs.pre.dev/agents.md, which has complete recipes, plan access, polling rules, errors and limits.
> Authenticate with the workspace API key (pdk_…) from Integrations → Built-in, sent as Authorization: Bearer <key>.
> REST API: https://api.pre.dev (OpenAPI: https://docs.pre.dev/api-reference/openapi.json). AI Gateway: https://api.pre.dev/v1, OpenAI-compatible (OpenAPI: https://docs.pre.dev/api-reference/ai-gateway.openapi.json).
> pre.dev MCP server: npx -y @predotdev/mcp setup adds it to every local coding agent with every pre.dev tool plus the user's own Chrome; the hosted server is https://api.pre.dev/mcp. Search these docs over MCP at https://docs.pre.dev/mcp.

# Custom domains

> Serve your published app on your own hostname.

Premium, Pro, Team, and Enterprise plans can connect one custom domain per project. The domain serves your [published](https://predev.mintlify.site/coding-agent/building/publish.md) app, and access to the app must be set to **Anyone**.

**1. Add the hostname**

Open **Publish** in the project header. Under **Custom domain**, enter a hostname such as `app.example.com` and choose **Add**. If the row asks you to, set **Access** to **Anyone** first.

**2. Configure DNS**

At your DNS provider, add the record the sheet shows:

| Type | Host | Value |
| - | - | - |
| CNAME | Your hostname, for example `app.example.com` | Your app's pre.dev address, as shown |

Enter the value as a hostname, without `https://` or a path. Some providers expect only the subdomain part, such as `app`, in the host field. For an apex domain, use your provider's CNAME flattening or alias record.

**3. Verify the connection**

Choose **Verify Connection**. DNS can take a few minutes to propagate. Once verification succeeds, the domain becomes active; allow time for the certificate before checking HTTPS.

**4. Check the application**

Open the domain and exercise key flows. Review allowed origins, sign-in callback URLs, cookies, and any provider configuration that depends on the hostname. The agent can help update application settings after the domain is active.

## Troubleshooting

| Symptom | What to check |
| - | - |
| No custom domain field | The plan is Premium or higher, access is **Anyone**, the project has a build, and no domain is already configured |
| DNS verification fails | The hostname resolves to the exact value shown; the DNS change may still be propagating |
| Verify is unavailable | Wait for the current operation to finish |
| HTTPS is not ready | Check hostname status and certificate provisioning; do not repeatedly remove a valid DNS record |
| The app loads but sign-in or API calls fail | Check callback URLs, allowed origins, cookies, and runtime configuration |

Use the domain's remove control to detach it, then remove the DNS record at your provider when it is no longer needed. The app's pre.dev address keeps working.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.