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

# Connect a domain

> Point a domain you own at another registrar to your Pxxl project: add it, set one DNS record, wait for activation, and fix common problems.

Connect a domain you already own, at any registrar or DNS provider, to a project on Pxxl. You keep the domain where it is and add one DNS record there. Pxxl checks the record, routes the domain to your project and issues the HTTPS certificate.

## Before you start

* A deployed project. If you haven't deployed yet, follow the [quickstart](https://docs.pxxl.app/quickstart.md).
* A domain you control, and access to its DNS settings (at Cloudflare, Namecheap, GoDaddy, Route 53…).
* Room on your plan for another custom domain.

## Step 1: Add the domain

**1. Open Add Domain**

Open **Domains**, choose **Add Domain**, then **Add Domain** again: "Connect a domain or subdomain you already control".

**2. Enter the name**

Type the domain, such as `example.com`, or a subdomain, such as `app.example.com`.

**3. Choose the www address (root domains)**

For a root domain, choose what happens to `www`:

| Choice | What visitors get |
| - | - |
| **Redirect www to root** (default) | `www.example.com` redirects to `example.com` with a permanent `308`. |
| **Serve both addresses** | Both names serve the app. |
| **Root domain only** | Only `example.com` is added. |

For `www` to work it also needs its own DNS record (step 2).

**4. Choose the project**

Pick the project that should receive the traffic, or leave **Connect later** and connect it from the domain's page afterwards.

**5. Add the domain**

Click **Add domain**. The domain's page opens with the records to set.

You can do the same from a project: **Networking > Domains > Custom Domain**. Or from the CLI:

```bash theme={null}
pxxl domains connect example.com --project <project-id>
```

## Step 2: Set the DNS record

Open your DNS provider and add the record shown on the domain's **Overview** under **DNS records**. Which one depends on the name.

### Root domain (`example.com`)

| Type | Name | Value | TTL |
| - | - | - | - |
| `A` | `@` | `193.181.208.160` | `60`, or the lowest your provider allows |

`@` means the domain itself. Some providers use an empty name field, or the domain name, instead.

Remove any other `A` or `AAAA` records on `@` that point elsewhere, such as a parking page. With two answers, some visitors would reach the old host.

### Subdomain (`app.example.com`, `www.example.com`)

| Type | Name | Value | TTL |
| - | - | - | - |
| `CNAME` | `app` | `<domain-id>.dns.pxxl.app` | `60` |

Copy the exact value from your domain's page: it contains your domain's own ID. Pxxl only activates a subdomain when its `CNAME` points at this value. An `A` record to Pxxl's IP isn't accepted for subdomains.

Most providers want only the label (`app`), not the full name (`app.example.com`), in the name field.

### Ownership check (sometimes)

Pxxl asks for one more record when it must be sure the domain is yours, for example when the name already pointed at Pxxl before you added it, or when another account had connected it before:

| Type | Name | Value |
| - | - | - |
| `TXT` | `_pxxl-challenge` | `pxxl-verify=<code from your domain page>` |

Add it, then choose **Check TXT record**. You can remove the `TXT` record once the domain is active. Domains you bought on Pxxl never need it.

### Using Cloudflare DNS

If your DNS is on Cloudflare, set the record to **DNS only** (grey cloud), not **Proxied**. With proxying on, Cloudflare answers with its own addresses and Pxxl can't see your record or issue the certificate.

## Step 3: Wait for activation

Choose **Check Activation Status** on the domain's page. Pxxl looks up your record and, once it matches:

1. routes the domain to your project,
2. requests a certificate from the certificate authority,
3. marks the domain **Active**.

You don't have to keep clicking. Pxxl re-checks every 5 minutes for 72 hours after you add the domain. Most records are visible within minutes; a provider with a long TTL can take a few hours.

In the project's **Networking > Domains** list, the domain moves through these statuses:

| Status | Meaning |
| - | - |
| **Verify ownership** | Add the `_pxxl-challenge` TXT record. |
| **DNS pending** | Pxxl can't see the record yet, or it points elsewhere. |
| **Pending deployment** | DNS is right; the project has no live deployment to route to. |
| **Going live** | The route and certificate are being set up. |
| **Active** | Serving your project over HTTPS. |
| **Routing error** / **Error** | Something failed. The domain's page shows why. |
| **Disabled** / **Suspended** | Paused by you, by [Public access](https://docs.pxxl.app/networking/cloudflare-tunnels.md#public-access), or by an account hold. |

## Check DNS yourself

Look up the record from your own machine to see what the internet sees:

```bash theme={null}
dig example.com A +short
# 193.181.208.160

dig app.example.com CNAME +short
# <domain-id>.dns.pxxl.app.
```

If the answer is empty or different, the record isn't saved, has a typo, or is still cached. Compare it with your provider's settings.

From the CLI, `pxxl domains check` looks at DNS, ownership, SSL and the route in one go:

```bash theme={null}
pxxl domains check example.com
```

## Troubleshooting

> [accordion] Stuck on DNS pending
>
> The record isn't visible yet, or it doesn't match. Check with `dig` as above. Common causes: a typo in the value, the full domain typed into the name field (giving `app.example.com.example.com`), an old `A` record still on `@`, or a Cloudflare record set to **Proxied**.

> [accordion] My provider doesn't allow a CNAME on the root
>
> That's normal: the root domain uses an `A` record, not a `CNAME`. Use `A @ 193.181.208.160`.

> [accordion] The certificate doesn't issue
>
> Pxxl can only get a certificate once DNS points at it. If DNS is right and the domain still shows a certificate problem after an hour, check for a `CAA` record that blocks the certificate authority:
>
> ```bash theme={null}
> dig example.com CAA +short
> ```
>
> If one exists, add `0 issue "letsencrypt.org"` and `0 issue "sectigo.com"` (used by ZeroSSL), or remove the `CAA` records. Then use **Refresh SSL** on the domain in the project's domain list.

> [accordion] www doesn't work
>
> `www` needs its own record: `CNAME www <domain-id>.dns.pxxl.app` (copy the value from the domain page), and the www choice in step 1 must not be **Root domain only**.

> [accordion] The browser warns about mixed content
>
> Your app loads some files over `http://` on an `https://` page. Change hard-coded `http://` URLs to `https://` or to relative paths.

More fixes in [Domain issues](https://docs.pxxl.app/troubleshooting/domains.md).

## Remove a domain

To stop serving a domain from a project, open the domain's **Settings > Project and route** and choose **Unlink project**. The domain stays in your account. To remove it completely, use **Delete** in its **Settings**.

Afterwards, delete the record at your DNS provider so the name doesn't keep pointing at Pxxl.

## Where to go next

> [card] [Domain settings](https://docs.pxxl.app/domains/proxy.md)
>
> HTTPS, headers, access rules and rate limits per domain.

> [card] [Transfer a domain](https://docs.pxxl.app/domains/transfers.md)
>
> Move the registration itself to Pxxl.


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