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

# Set up a custom domain

> Serve a CDN project from a hostname you own, alongside your pixglory.com link.

A custom domain lets a CDN project serve from a hostname you control, like
`cdn.yoursite.com`, instead of only its `pixglory.com` link. Your pixglory.com link keeps
working the whole time. Adding or removing a custom domain never changes it.

## Before you start

Custom domains are included on paid plans. How many you get depends on your plan:

| Plan    | Custom domains |
| ------- | -------------- |
| Free    | 0              |
| Starter | 1              |
| Pro     | 5              |
| Scale   | 25             |

You will also need access to your domain's DNS settings, at your registrar or DNS
provider.

## Add the domain

1. Open the CDN project you want to serve from your domain, and go to its **Domains** tab.
2. Enter the hostname you want to use, for example `cdn.yoursite.com`, and click **Add**.

The domain appears in the list with a status of **Pending DNS**, and PixGlory shows you the
DNS record to create next.

## Add the routing record

This record is required. PixGlory shows you the exact values:

| Type  | Name          | Target             |
| ----- | ------------- | ------------------ |
| CNAME | your hostname | `cdn.pixglory.com` |

Add it at your DNS provider exactly as shown. The **Name** and **Target** fields in your
dashboard are each copyable, so you don't have to retype them.

<Warning>
  **If your domain's DNS is also hosted on Cloudflare**, set this record to **DNS only**
  (grey cloud), not proxied (orange cloud). A proxied record hides your target from
  verification, and the domain stays stuck at Pending DNS no matter how long you wait.
</Warning>

## Add the certificate check (optional)

Your dashboard also offers a second, optional record, labeled **"Optional: add this record
too and your certificate is ready before you switch traffic."** It is a `CNAME` starting with
`_acme-challenge.`, with a target unique to your domain that your dashboard shows you
exactly.

Skip it, and everything above still works. Your certificate simply finishes issuing after
you switch your CNAME over, the same as it does today.

Add it, and your certificate is issued in advance. That matters most if your domain is
already live somewhere else: without it, there is a short window between your CNAME
pointing at PixGlory and your certificate finishing, during which visitors can see a
certificate warning. With it, that window doesn't exist.

## Check the status

Each domain shows one of three statuses:

* **Pending DNS**: waiting to see your CNAME record. Give DNS a few minutes to propagate,
  then click **Refresh status**.
* **Active**: verified, and serving your project.
* **Failed**: PixGlory shows the reason next to the status. Fix it and click **Refresh
  status** again.

## Troubleshooting

**Stuck at Pending DNS:**

* Check that the record's name and target match exactly what your dashboard showed you.
* If your domain is on Cloudflare, confirm the record is DNS only, not proxied (see the
  callout above). This is the single most common cause.
* DNS changes can take a few minutes to reach PixGlory even after they're live everywhere
  else. Wait a bit, then click **Refresh status** again.

**Failed:**

* The reason is shown directly next to the status in your dashboard, so you don't have to
  guess. Correct the record it describes and click **Refresh status**.

## Removing a domain

Removing a domain stops it from serving immediately. Your pixglory.com link is never
affected: it keeps working exactly as it did before you added the domain, and exactly as it
will after you remove it.

Also delete the CNAME record at your DNS provider once you remove the domain here. A record
left pointing at PixGlory after you've released the hostname could let someone else claim
it.
