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

# Custom domains

> Serve your stream from your own domain instead of streampixel.io.

Replace the default `share.streampixel.io` URL with one of your own — `play.yourgame.com`, `demo.yourcompany.com`. Useful for branding, same-origin embedding (no third-party cookie issues), and tight Content Security Policies.

## Add a custom domain

<Steps>
  <Step title="Open Project Settings">
    Navigate to the project that should serve from a custom domain and open **Project Settings**.
  </Step>

  <Step title="Open the Custom Domains tab">
    Click **Custom Domains**.
  </Step>

  <Step title="Enter your domain">
    Type the full domain or subdomain you want to use, e.g. `play.example.com`. Submit.
  </Step>

  <Step title="Add the DNS record">
    Streampixel shows a `CNAME` (or `A` record for apex domains) value. Copy it and add it at your DNS provider — Cloudflare, Route 53, GoDaddy, Namecheap, etc.
  </Step>

  <Step title="Click Verify">
    Once the DNS record is live, click **Verify** in the dashboard. Streampixel checks resolution and provisions HTTPS.
  </Step>

  <Step title="Wait for propagation">
    Verification can take a few minutes. Once it succeeds, the domain shows as **Active** and the stream is reachable.
  </Step>
</Steps>

<Frame caption="Adding a custom domain">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/streampixel/images/Custom-Domain.png" alt="Custom domain settings" />
</Frame>

## DNS setup

Use a `CNAME` for subdomains (recommended) and an `A` record for apex domains.

| Record type | When to use                                                                        | Example                                   |
| ----------- | ---------------------------------------------------------------------------------- | ----------------------------------------- |
| `CNAME`     | Subdomains like `play.example.com`                                                 | `play.example.com → cname.streampixel.io` |
| `A`         | Apex domains like `example.com` (some registrars do not allow `CNAME` at the apex) | `example.com → 203.0.113.10`              |

The exact target value is shown in the dashboard — always copy it from there rather than guessing.

<Note>
  DNS changes can take **a few minutes to several hours** to propagate globally, depending on your provider's TTL and your registrar. If verification fails immediately after adding the record, wait 5-10 minutes and try again.
</Note>

## HTTPS / TLS

Streampixel handles certificate provisioning **automatically** as soon as DNS verification succeeds. There is no need to upload a certificate, generate a CSR, or renew anything. Certificates are renewed before expiry without any action on your side.

The stream is only served over HTTPS — there is no HTTP fallback.

<Info>
  If your DNS provider has CAA records, make sure they permit Streampixel's certificate authority. Most defaults are permissive enough; if certificate issuance fails, removing the CAA record temporarily is the easiest fix.
</Info>

## Multiple domains per project

Click **Add another** to attach more than one domain — useful for migrations, regional variants (`play.example.com` + `play.example.de`), or apex + `www`.

## Remove a domain

<Steps>
  <Step title="Open the Custom Domains tab">
    Find the domain you want to remove.
  </Step>

  <Step title="Click Remove">
    Confirm in the dialog.
  </Step>

  <Step title="Clean up DNS">
    Delete the `CNAME` or `A` record at your DNS provider so the hostname no longer points at Streampixel.
  </Step>
</Steps>

<Warning>
  Removing a domain takes effect immediately. Any embed or share link using that domain will break the moment you confirm.
</Warning>

## Troubleshooting

| Problem                                                          | Cause                                         | Fix                                                                                          |
| ---------------------------------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Verification fails                                               | DNS record not propagated yet                 | Wait 5-10 minutes, then click **Verify** again.                                              |
| Verification fails                                               | DNS record points at the wrong target         | Re-copy the exact value shown in the dashboard.                                              |
| Verification fails                                               | A pre-existing record is still cached         | Lower the TTL on your DNS, wait, then retry.                                                 |
| HTTPS shows a warning                                            | Certificate is still provisioning             | Wait a minute or two after a successful verification.                                        |
| Stream loads on the streampixel.io URL but not the custom domain | DNS resolves but is pointed at the wrong host | Use `dig +short play.example.com` to confirm it resolves to the value the dashboard expects. |
| Embedding still shows third-party cookie warnings                | Browser is caching the old origin             | Hard-refresh the embedding page after switching the embed URL to the custom domain.          |

<Tip>
  Use `dig`, `nslookup`, or [dnschecker.org](https://dnschecker.org) to verify DNS propagation across regions before clicking **Verify**.
</Tip>

## Next

<CardGroup cols={2}>
  <Card title="Share & embed" icon="share" href="/resources/quick-start-guide/sharing-and-embedding">
    Use your custom domain in iframes.
  </Card>

  <Card title="Security & access" icon="shield" href="/resources/quick-start-guide/security-control">
    Whitelist your domain alongside `share.streampixel.io`.
  </Card>
</CardGroup>
