# Set up your custom domain

> Add your domain in Leal, create the two CNAME records with your DNS provider, and check the status until your domain is active.

Setting up a custom domain takes three steps: tell Leal the domain, add two DNS records where your domain is managed, then wait for Leal to issue a security certificate. You'll need Pro and a login for your domain provider.

## Step 1: Add the domain in Leal

1. Open your account menu and click **Custom domain**.
2. Click **Connect a domain**.
3. Under **Domain**, enter the full subdomain you want to use, for example `loyalty.yourstore.com`. Don't include `https://` or a slash at the end.
4. Click **Save domain**.

Leal registers the domain and shows the two DNS records you need to add.

### Choosing a name

Pick something short and clear, because customers will see it. `loyalty.`, `cards.` or `rewards.` in front of your website's domain all work well. Each domain can only be connected to one store in Leal.

## Step 2: Add the DNS records

DNS records are the settings that tell the internet where a web address should go. You add them wherever your domain is managed: usually the company you bought the domain from (such as GoDaddy or Namecheap), or a service like Cloudflare if you've moved your DNS there.

The **Custom domain** page shows both records under **Add these DNS records with your domain registrar**, with a **Copy** button for each value. For `loyalty.yourstore.com` they look like this:

| Type | Name | Target |
| --- | --- | --- |
| CNAME | `loyalty` | `cname.getleal.com` |
| CNAME | `_acme-challenge.loyalty` | a long address ending in `dcv.cloudflare.com` |

Always copy the values from your own **Custom domain** page. The second target is specific to your domain.

What each record does:

- **The first record** sends visitors of your subdomain to Leal. A CNAME record says "this name is another name for that address".
- **The second record** lets the certificate service prove you control the domain, so it can issue the security certificate that makes the padlock appear in the browser. It's only used for that check.

### Adding them

1. Sign in to your DNS provider and open the DNS settings for your main domain (`yourstore.com`).
2. Add a new record, choose **CNAME** as the type, and paste the **Name** and **Target** from Leal.
3. Do the same for the second record.
4. Save your changes.

> [!TIP]
> Most providers add your main domain to the end of the name automatically. Enter `loyalty`, not `loyalty.yourstore.com`. If you look at the finished record and see `loyalty.yourstore.com.yourstore.com`, remove the repeated part.

> [!WARNING]
> On Cloudflare, set both records to **DNS only** (the grey cloud), not **Proxied** (the orange cloud).

## Step 3: Wait for the certificate

Go back to **Custom domain** in Leal. While DNS spreads you'll see **Waiting for DNS** and a status next to your domain. Click **Check status** after a few minutes. When the badge says **Active**, your domain is live.

Leal checks the domain when you open the page or click **Check status**, so come back to the page once your records are in. Your links switch to the new domain once the page shows **Active**.

## What changes for customers

- New poster QR codes and signup links use your domain. If you've already printed posters, you don't need to reprint them. Old Leal links send customers on to the same page on your domain.
- Wallet pass links and referral links that Leal sends from now on use your domain.
- Visiting your bare domain, such as loyalty.yourstore.com with nothing after it, opens Leal's website. Only the customer pages live on your domain.

## Change or remove the domain

- **Change it:** click **Edit**, enter the new domain and click **Save domain**. Then add the new DNS records Leal shows. The old domain stops working with Leal.
- **Remove it:** click **Remove** and confirm. Links go back to Leal's own address.

> [!WARNING]
> Posters, flyers or links that show your custom domain stop working once you remove or change it in Leal. If you've printed QR codes with your domain, reprint them first, or keep the domain connected.
