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

# Custom Domain Setup

> Connect your own domain to your Fungies storefront for a seamless brand experience.

Custom domains let you serve your Fungies store from your own domain (e.g., `store.yourgame.com`) instead of the default Fungies subdomain.

## Benefits

* **Brand consistency** - Keep customers on your domain throughout the purchase flow
* **Trust** - Customers feel more confident buying from a domain they recognize
* **SEO** - Build domain authority for your own properties

## Prerequisites

Before you begin, make sure you have:

<Check>Access to your domain's DNS settings (through your registrar or DNS provider)</Check>
<Check>A domain or subdomain you want to use (e.g., `store.yourdomain.com`)</Check>

## Setup Process

<Steps>
  <Step title="Enter your domain">
    Go to **Settings** → **Domain** in the Fungies Dashboard and enter your custom domain
  </Step>

  <Step title="Add DNS records">
    Add the provided DNS records to your domain's DNS settings
  </Step>

  <Step title="Wait for validation">
    Fungies will automatically validate your domain and issue SSL certificates
  </Step>
</Steps>

## Step 1: Enter Your Domain

1. Go to [Fungies Dashboard](https://app.fungies.io) → **Settings** → **Domain**
2. In the **Custom domain** section, enter your domain (e.g., `store.yourgame.com`)
3. Click **Submit** to start the setup process

<Tip>
  We recommend using a subdomain like `store.` or `shop.` rather than your root domain for easier DNS configuration.
</Tip>

## Step 2: Add DNS Records

After submitting your domain, you'll see a table of DNS records to add. There are typically three types:

### Certificate Validation Record

| Type  | Name                     | Value                          | Proxy |
| ----- | ------------------------ | ------------------------------ | ----- |
| CNAME | `_abc123.yourdomain.com` | `_xyz789.acm-validations.aws.` | OFF   |

This record proves you own the domain and allows AWS to issue an SSL certificate.

### Hostname Validation Record

| Type  | Name                   | Value              | Proxy |
| ----- | ---------------------- | ------------------ | ----- |
| CNAME | `store.yourdomain.com` | `cname.fungies.io` | OFF   |

This record points your domain to the Fungies servers.

### Certificate Renewal Record (DCV delegation)

| Type  | Name                                   | Value                                 | Proxy |
| ----- | -------------------------------------- | ------------------------------------- | ----- |
| CNAME | `_acme-challenge.store.yourdomain.com` | `store.yourdomain.com.dcv.fungies.io` | OFF   |

This `_acme-challenge` CNAME delegates certificate control validation (DCV) to Fungies. Once it's in place, Fungies handles **both the initial SSL issuance and automatic renewal** on your behalf — you don't need to add or manage any other certificate record for this domain.

<Warning>
  Add the `_acme-challenge` record as a **CNAME** exactly as shown. Do **not** also add a `_acme-challenge` **TXT** record — a CNAME cannot coexist with another record type at the same name (RFC 1034/2181), and the extra TXT will block validation and renewal.
</Warning>

<Note>
  **Manual TXT fallback:** if the Dashboard shows a `_acme-challenge` **TXT** record instead of the delegation CNAME, DCV delegation isn't available for your setup. In that case add the TXT record as shown and do not add the `_acme-challenge` CNAME. The Dashboard only ever asks for one of the two.
</Note>

<Warning>
  If you're using Cloudflare, make sure the **Proxy** toggle is set to **OFF** (DNS only, grey cloud) for all records. Proxied records will prevent validation.
</Warning>

## Step 3: Wait for Validation

The setup status shows three stages:

```mermaid theme={null}
flowchart LR
    A["Certificates Issued"] --> B["Certificate Validated"]
    B --> C["Domain Setup Complete"]
    
    style A fill:#fef3c7
    style B fill:#fef3c7
    style C fill:#d1fae5
```

| Stage                     | Description                               | Typical Time |
| ------------------------- | ----------------------------------------- | ------------ |
| **Certificates Issued**   | Fungies requests SSL certificates         | Instant      |
| **Certificate Validated** | DNS records verified, certificates issued | 5-30 minutes |
| **Domain Setup**          | Domain is fully configured and live       | 1-5 minutes  |

<Info>
  DNS changes can take up to 24 hours to propagate globally, though most complete within 30 minutes. Click **Refresh** in the Dashboard to check the current status.
</Info>

## Root Domain Setup (Apex Domains)

If you want to use a root domain (e.g., `yourgame.com` without `www` or any subdomain), additional configuration is required.

<Warning>
  Root domains require CNAME flattening or ALIAS/ANAME record support, which is only available on certain DNS providers like **Cloudflare**, **Namecheap**, **DNSimple**, and some others.
</Warning>

### Recommended Approach

We strongly recommend one of these options:

1. **Use a subdomain** - Set up `www.yourdomain.com` or `store.yourdomain.com` instead
2. **Move DNS to Cloudflare** - [Migrate your DNS to Cloudflare](https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/) for CNAME flattening support

### Cloudflare Configuration

If using Cloudflare for a root domain:

1. Add the CNAME record as provided
2. Set the proxy status to **DNS only** (grey cloud)
3. Cloudflare will automatically flatten the CNAME at the root

## Troubleshooting

### Certificate Validation Taking Too Long

If certificate validation is stuck for more than 30 minutes, you may need to add a CAA record:

| Type | Name             | Value                  |
| ---- | ---------------- | ---------------------- |
| CAA  | `yourdomain.com` | `0 issue "amazon.com"` |

This authorizes Amazon (AWS) to issue certificates for your domain.

<Info>
  CAA records are typically only needed if you have existing CAA records that restrict certificate issuance. If you don't have any CAA records, you probably don't need to add one.
</Info>

### Domain Still Not Working

Check these common issues:

| Issue                       | Solution                                                                   |
| --------------------------- | -------------------------------------------------------------------------- |
| Proxy enabled on Cloudflare | Disable proxy (set to DNS only / grey cloud)                               |
| Wrong CNAME value           | Ensure you copied the exact value from the Dashboard                       |
| TTL too high                | Lower TTL to 300 (5 minutes) for faster propagation                        |
| Cached DNS                  | Try from a different network or use [DNS Checker](https://dnschecker.org/) |

### Need Help?

If you're still having issues after 24 hours, contact us:

* **Discord**: [discord.gg/yfH5ZyTZH4](https://discord.gg/yfH5ZyTZH4)
* **Email**: [support@fungies.io](mailto:support@fungies.io)

## Removing a Custom Domain

To remove your custom domain and revert to the default Fungies subdomain:

1. Go to **Settings** → **Domain**
2. Click **Delete** next to your custom domain
3. Confirm the action

The removal process takes up to 10 minutes. Your store will remain accessible via the default Fungies domain.
