# Use your own domain for bookings

A custom domain serves your PiGi booking site at an address you own, such as book.yourschool.com, instead of <your-slug>.pigi.io. You add two DNS records at your domain provider — a TXT record to prove ownership and a CNAME (or A records for a root domain) to route traffic — and PiGi issues the HTTPS certificate itself.

Source: https://help.pigi.io/guides/integrations/website/custom-domain

## Quick answers

**Can customers book on my own domain instead of pigi.io?**
Yes. Add the domain under **Settings → General → Custom domains**, create the two DNS
records PiGi shows you, and the booking site is served there once the domain row shows
**Live since**. Your `<your-slug>.pigi.io` address keeps working alongside it.

**Should I use a subdomain like book.yourschool.com or my main domain?**
A subdomain is simplest and leaves your existing website alone. It takes one CNAME
record. A root domain (yourschool.com) needs A records instead, because most DNS
providers cannot put a CNAME on a root domain, and it replaces whatever website lives
there now.

**What exactly do I enter at my DNS provider?**
The values on the domain's DNS panel in PiGi, using the copy buttons: a TXT record at
`_pigi-verify.<your domain>` with your verification token, and a CNAME pointing at the
PiGi load balancer (or A records for a root domain). The values are specific to your
domain, so always copy them from the panel.

**How long does it take?**
Usually minutes, occasionally up to an hour for DNS to spread. PiGi re-checks every 15
minutes on its own, and **Check now** checks immediately. The certificate follows within
a few minutes of the first visit.

**Do I need to buy an SSL certificate?**
No. PiGi issues and renews the HTTPS certificate automatically.

**Does Yoco need my domain verified?**
Yoco unlocks live keys only after it reviews and approves a website domain in the Yoco
app (**Verified domains → Add domain**). That review is separate from PiGi's check. Set
your custom domain up first, so Yoco reviews the address customers actually book and pay
on.

**Which domain appears in emails and invoices?**
The primary one. Click **Make primary** on the domain customers should see.

**Will the old pigi.io links stop working?**
No. The `<your-slug>.pigi.io` address keeps working, so removing a custom domain never
takes your booking site offline.

## What this does

A custom domain puts your booking pages, links in emails and invoices, and payment
return pages on an address customers recognise. Some providers also check the domain:
Yoco reviews it before issuing live keys, and Google Merchant Center needs a website it
can verify. PiGi charges nothing extra; you pay your domain registrar as usual.

## Before you start

- The **admin** role in PiGi.
- A domain you own, and a login to wherever its DNS is managed (Cloudflare, GoDaddy,
  Namecheap, Hover, or your web host).
- A decision on the host: a subdomain (`book.yourschool.com`) or the root domain.

## Set up DNS at your provider

PiGi's **How custom domains work** panel lists where the DNS screen is:

- Cloudflare → DNS → Records → Add record
- GoDaddy → My Products → Domain → DNS
- Namecheap → Domain List → Manage → Advanced DNS
- Hover → Domains → DNS

1. Add a **TXT** record. Name: `_pigi-verify` (some providers want the full
   `_pigi-verify.book.yourschool.com`). Value: the token from PiGi.
2. Add the traffic record. For a subdomain: a **CNAME** with name `book` and the target
   shown in PiGi. For a root domain: the **A** records shown in PiGi.
3. Remove any older record on the same name that points elsewhere, or the check fails.
4. Save. In Cloudflare you can leave the proxy (orange cloud) on or off.

## Connect it to PiGi

1. Open **Settings → General → Custom domains** and click **Add domain**.
2. In **Add a custom domain**, type the bare host, such as `book.yourschool.com`, with no
   `https://` and no trailing slash. Click **Add domain**. "Domain added — add the DNS
   record next" confirms it and the DNS panel opens.
3. Copy each record into your DNS provider (see above).
4. Click **Check now**. The **Ownership**, **Traffic** and **Certificate** pills turn
   green in turn.
5. When the row shows **Live since**, click **Make primary** if this is the address customers
   should see.

## Test it

1. Open `https://book.yourschool.com` in a private browser window. Your booking site
   should load with a padlock.
2. Make a test booking and check the confirmation email links use the new domain.

## Troubleshooting

- **"No new DNS records found yet — give it a few minutes".** DNS has not spread yet, or
  the record name is wrong. Check for a doubled domain such as
  `_pigi-verify.book.yourschool.com.yourschool.com`.
- **Stuck on "Waiting on the ownership TXT record".** The TXT value must match the token
  exactly, without extra quotes or spaces.
- **"Ownership confirmed — traffic record still missing".** The CNAME or A record is
  missing or points somewhere else.
- **"Traffic reaching us — certificate issues on the first request".** Open the domain
  in a browser once; the certificate is issued on that visit.
- **"No traffic record is configured for this platform yet".** Nothing on your side can
  fix this. Contact PiGi support.

## Known limitations

- Signing in on your custom domain is a separate session from `<your-slug>.pigi.io`.
- Once **Traffic** turns green it stays green until the next check records an error,
  even if you remove the record.
- The slug in `<your-slug>.pigi.io` cannot be changed from settings.

## Sources

- [Cloudflare: Create DNS records](https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/)
- [Yoco: Yoco Gateway for WooCommerce user guide (Verified domains)](https://support.yoco.help/en/articles/109564-yoco-gateway-for-woocommerce-user-guide)
