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

# Custom Domain Setup

> Route Kashimi's hosted payment UI and API through your own domain using DNS records.

Custom domain setup lets you replace Kashimi's default hostnames with your own subdomain. Your customers will see `psu.yourdomain.com` instead of `psu.kashimi.tech`, and your API calls will go through `api.yourdomain.com` instead of `api.kashimi.tech`.

Once configured, all traffic still routes through Kashimi's infrastructure — your domain is mapped using a CNAME, and Kashimi handles TLS termination via Cloudflare for SaaS.

<Info>
  To get started, contact [admin@kashimi.tech](mailto:admin@kashimi.tech). Kashimi will configure the custom hostname mappings on our side and provide you with the DNS validation values you need to add.
</Info>

***

## What Kashimi sets up

When you request a custom domain, Kashimi will:

1. Register your subdomains as custom hostnames in Cloudflare (`psu.yourdomain.com` and `api.yourdomain.com`)
2. Provide you with the pre-validation TXT record names and values for DNS verification
3. Add your hostnames to the ingress routing configuration

***

## What you need to do

In your DNS provider (e.g. Route 53, Cloudflare, or your registrar's hosted zone), add the following records for each subdomain.

### For `psu.yourdomain.com`

| Type    | Name                 | Value                                            |
| ------- | -------------------- | ------------------------------------------------ |
| `TXT`   | Provided by Kashimi  | Provided by Kashimi — hostname pre-validation    |
| `TXT`   | Provided by Kashimi  | Provided by Kashimi — certificate pre-validation |
| `CNAME` | `psu.yourdomain.com` | `psu.kashimi.tech`                               |

### For `api.yourdomain.com`

| Type    | Name                 | Value                                            |
| ------- | -------------------- | ------------------------------------------------ |
| `TXT`   | Provided by Kashimi  | Provided by Kashimi — hostname pre-validation    |
| `TXT`   | Provided by Kashimi  | Provided by Kashimi — certificate pre-validation |
| `CNAME` | `api.yourdomain.com` | `api.kashimi.tech`                               |

<Warning>
  Do not add the CNAME record before the TXT validation records are in place. Cloudflare requires pre-validation to complete before the custom hostname becomes active.
</Warning>

***

## How it works

Once DNS propagates, all traffic flows like this:

```
Your client
  → DNS resolves api.yourdomain.com
  → CNAME points to api.kashimi.tech
  → api.kashimi.tech is proxied by Cloudflare
  → Cloudflare matches the custom hostname mapping
  → Request is routed to Kashimi's origin infrastructure
```

TLS is handled end-to-end by Cloudflare for SaaS. Your domain gets its own certificate — your customers will see a valid certificate for `psu.yourdomain.com` and `api.yourdomain.com`.

***

## Checklist

<Steps>
  <Step title="Contact Kashimi">
    Email [admin@kashimi.tech](mailto:admin@kashimi.tech) with the two subdomains you want to use (`psu.` and `api.`).
  </Step>

  <Step title="Receive validation values">
    Kashimi will send you the TXT record names and values for hostname and certificate pre-validation.
  </Step>

  <Step title="Add DNS records">
    In your DNS provider, add the two TXT records and the CNAME record for each subdomain as described above.
  </Step>

  <Step title="Confirm propagation">
    Once DNS has propagated (typically within minutes, up to 24 hours), Kashimi will verify the configuration and confirm your custom domains are live.
  </Step>
</Steps>
