> ## 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.

# Wildcard domains

> Serve every subdomain of your domain, like shop.example.com and api.example.com, from one project with one certificate.

A wildcard domain such as `*.example.com` sends every name directly under your domain to one project. `shop.example.com`, `api.example.com` and any name you haven't thought of yet all reach the same app over HTTPS, with one certificate that Pxxl issues and renews for you.

Use it when each customer or team gets their own subdomain, for preview links, or anywhere you'd otherwise add the same project's subdomains one by one.

| | |
| - | - |
| **Plans** | Plus, Pro and Enterprise |
| **Covers** | One level: `*.example.com` serves `shop.example.com`, not `a.shop.example.com` or `example.com` itself |
| **Certificate** | Issued by Let's Encrypt, with ZeroSSL as a backup, and renewed automatically |
| **DNS records** | Three. On Pxxl DNS they're added for you |

## Before you start

* The domain is on your Pxxl account, bought through Pxxl or [connected from another registrar](https://docs.pxxl.app/domains/overview.md).
* The project that should serve the wildcard is deployed.
* If the domain's DNS is elsewhere (Cloudflare, Namecheap, GoDaddy…), you can edit its records there.

## Set up a wildcard

**1. Open the domain and choose Add wildcard**

Open **Domains** and select your domain. The **Wildcards** card on its **Overview** lists the wildcards already under it and their status. Click **Add wildcard**.

![The Wildcards card on a domain's overview, listing four wildcards with their status and an Add wildcard button.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/01-domain-wildcards-card.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=cb7d17e4ced1219b9caec080e3ecdf45)

**2. Choose the name and the project**

In the panel that opens:

* **Under (optional)**: leave it empty for `*.example.com`, or type a label such as `app` for `*.app.example.com`.
* **Project**: the project that serves every name.

Check the name on the button, then click it to add the wildcard.

![The Add wildcard panel with app typed under the domain and a project chosen. The button reads Add \*.app.wildcard-demo.example.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/02-add-wildcard-panel.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=dd711033f5f49ea3dc215321697a160b)

**3. Add the three DNS records**

Pxxl opens the new wildcard's page. Its **Overview** lists three records under **Wildcard DNS**:

| Type | Name | What it does |
| - | - | - |
| `A` | `*` (or `*.app`) | Sends every subdomain to Pxxl |
| `CNAME` | `_acme-challenge` | Lets Pxxl prove control of the domain to the certificate authority, now and at every renewal |
| `TXT` | `_pxxl-challenge` | Proves the domain is yours |

![The Wildcard DNS card with the A, CNAME and TXT records to add, a DNS pending badge and a Check DNS button.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/03-wildcard-dns-records.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=a493ac412d109c6c79773c82b3d6d2ae)

**On Pxxl DNS** there's nothing to do. Pxxl adds the three records to your zone and leaves your other records alone.

**Anywhere else**, add the three records at your DNS provider exactly as shown. Copy the values from your own page: the `CNAME` and `TXT` values are different for every wildcard. Most providers want only the part before your domain in the name field, for example `_acme-challenge.app` rather than `_acme-challenge.app.example.com`.

> [!WARNING]
>
> On Cloudflare, set the `A` record to **DNS only** (grey cloud). A proxied record points at Cloudflare instead of Pxxl, and the certificate can't be issued.

**4. Wait for the checks**

Open the **Certificate** tab to follow along. Pxxl checks the records on its own, so you can leave and come back. After changing a record, click **Check DNS** to look again straight away.

![The Certificate tab with Ownership TXT, ACME CNAME and Edge probe waiting, and a note naming the record each check is looking for.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/04-certificate-waiting-for-dns.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=b95e6b949e7e466e215f8a1dc393c802)

| Check | Passes when |
| - | - |
| **Ownership TXT** | The `_pxxl-challenge` record has the value shown |
| **ACME CNAME** | `_acme-challenge` points at the `acme.pxxl.surf` name shown |
| **Edge probe** | Names under the wildcard reach Pxxl |

While a check waits, the note under the steps says which record it's looking for and what it found instead. DNS changes usually show within a few minutes, though some providers take longer.

**5. Get the certificate**

Once all three checks pass, Pxxl requests the certificate. This usually takes a minute or two, and at most about five.

![All three checks passed and the certificate issuing.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/05-certificate-issuing.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=2884a8d854251d3bd62fcea1f65f2f88)

When **Certificate** shows **Active**, every name under the wildcard is live over HTTPS.

![All three checks passed and the certificate active.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/06-certificate-active.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=2759f7fc6ba202fb078b7c8b7e60fdbe)

Try any name under it:

```bash theme={null}
curl -I https://anything.app.example.com
```

## Add a wildcard from a project

You can also start from the project. Open it, go to **Networking > Domains**, click **Custom Domain**, type the domain and tick **Wildcard (\*.yourdomain.com)**. The form shows which names it will cover. From there the steps are the same: add the DNS records, then wait for the checks.

![The project's Custom Domain form with shop.wildcard-demo.example typed and the Wildcard box ticked.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/09-project-add-wildcard.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=b1e348d76ad311cb4cb25902e201f6cb)

The project's domain list shows each wildcard with a **Wildcard** tag and its status, next to the project's other domains.

![A project's domain list with four wildcards: DNS pending, issuing certificate, active and certificate failed.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/08-project-domains-list.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=bc2db488b9508067e6831db1401dda27)

## Status

| Status | Meaning |
| - | - |
| **DNS pending** | Pxxl is waiting for one or more of the three records. The **Certificate** tab says which. |
| **Issuing certificate** | The records are in place and the certificate is on its way. |
| **Active** | Every name under the wildcard is served over HTTPS. |
| **Certificate failed** | The certificate authority refused the certificate. See below. |

## If the certificate fails

The **Certificate** tab shows the error from the certificate authority. Pxxl keeps retrying on its own. After fixing the cause, click **Retry** to try again straight away.

![The Certificate tab showing Certificate failed, the error, and a Retry button.](https://mintcdn.com/pxxl/9UGxMl1zkMcKEhM-/images/wildcard-domains/07-certificate-failed.jpeg?fit=max\&auto=format\&n=9UGxMl1zkMcKEhM-\&q=85\&s=91f97a925bd4891d8399a1c72cb02ff0)

> [accordion] The A record is proxied or points elsewhere
>
> The `A` record must point straight at the address on the wildcard's **Overview**. On Cloudflare, switch it to **DNS only**.

> [accordion] The CNAME was removed or changed
>
> Keep `_acme-challenge` exactly as shown. Pxxl uses it again at every renewal, about every 60 days, so removing it later lets the certificate expire.

> [accordion] The domain has CAA records
>
> CAA records list which certificate authorities may issue for your domain. If you have any, they must allow `letsencrypt.org`, and `sectigo.com` for the ZeroSSL backup.

## How wildcards work with your other domains

* **Exact domains win.** If `shop.example.com` is also added to a project on its own, it goes to that project, with its own certificate. Every other name goes to the wildcard's project.
* **One level only.** `*.example.com` doesn't cover `a.b.example.com` or `example.com`. Add `*.b.example.com` or the domain itself separately if you need them.
* **Keep the records.** All three stay in place for as long as you use the wildcard.
* **Persistent connections.** Wildcards are served from Pxxl's main edge and can't be chosen as persistent connection domains.

## Remove a wildcard

Open the wildcard, go to **Settings > Danger zone** and click **Delete domain**. Every name under it stops being served. If you no longer need the three DNS records, remove them at your DNS provider, or from the domain's **DNS** tab on Pxxl DNS.


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