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

# Custom Domains & DNS

> Point your domain to your Nometria deployment and get automatic SSL.

Every Nometria deployment gets a free `*.nometria.com` staging URL immediately. Add your own domain whenever you're ready.

## Add a custom domain

<Steps>
  <Step title="Open domain settings">
    Dashboard → your project → **Settings** → **Domain**.
  </Step>

  <Step title="Enter your domain">
    Type in your domain, for example `app.yourcompany.com` or `yourcompany.com` for apex domains.
  </Step>

  <Step title="Add the DNS records">
    Nometria shows you the exact records to add in your DNS provider:

    **For subdomains** (e.g. `app.yourcompany.com`):

    ```
    Type: CNAME
    Name: app
    Value: <your-deployment-id>.nometria.com
    TTL: 300
    ```

    **For apex domains** (e.g. `yourcompany.com`):

    ```
    Type: A
    Name: @
    Value: <your-instance-ip>
    TTL: 300
    ```

    Add these records in your domain registrar or DNS provider (Cloudflare, Route53, Namecheap, GoDaddy, etc.).
  </Step>

  <Step title="Wait for SSL">
    Nometria polls for DNS propagation and automatically issues a TLS certificate once your domain resolves correctly. This typically takes 2–10 minutes, but can take up to 48 hours with some registrars.

    You'll see a green checkmark in the dashboard when SSL is active.
  </Step>
</Steps>

## Using Cloudflare

If your domain is on Cloudflare:

<Warning>Set the Cloudflare proxy (orange cloud) to **DNS only** (grey cloud) initially. Once Nometria's SSL is active, you can switch back to proxied if you want Cloudflare's CDN in front.</Warning>

If you keep Cloudflare's proxy enabled:

* Set SSL/TLS mode to **Full (strict)** in Cloudflare to avoid redirect loops
* Cloudflare issues its own certificate to the browser; Nometria's certificate is used between Cloudflare and your server

## Multiple domains

You can add multiple domains to one deployment — for example, `www.yourcompany.com` and `yourcompany.com`:

1. Add both domains in Settings → Domain
2. Set one as the **Primary** domain — all other domains redirect to it

## Removing a domain

Dashboard → Settings → Domain → click the trash icon next to the domain. DNS records on your provider are not automatically removed — delete them manually to avoid dangling records.

## Troubleshooting

<AccordionGroup>
  <Accordion title="SSL certificate stuck on 'Pending'">
    Nometria can't issue a certificate until your DNS records propagate. Check propagation at [dnschecker.org](https://dnschecker.org) — once your domain resolves to the correct value globally, the certificate issues within 1–2 minutes.
  </Accordion>

  <Accordion title="ERR_TOO_MANY_REDIRECTS">
    This usually means a Cloudflare + HTTP redirect conflict. Set Cloudflare SSL/TLS mode to **Full (strict)** or temporarily disable the Cloudflare proxy while verifying your SSL.
  </Accordion>

  <Accordion title="Domain shows wrong content or old deployment">
    Your browser may have cached the old IP. Try `curl -I https://yourdomain.com` to bypass the browser cache. If that's correct, do a hard refresh (`Cmd+Shift+R` on Mac).
  </Accordion>
</AccordionGroup>
