> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom domains

> Point your own domain at a vly app. DNS records, SSL, apex domains, redirects, multi-environment setups — the complete walkthrough.

Every vly project gets a `*.vly.app` URL automatically. To use your own domain — `yourapp.com`, `app.yourcompany.com`, `docs.yourapp.com` — you'll add it in vly's dashboard and configure two DNS records at your provider.

End-to-end: \~5 minutes including DNS propagation.

## The fast path

<Steps>
  <Step title="In vly: add the domain">
    Open your project. **Settings → Domains → Add domain**. Enter the full domain (including subdomain): `app.yourcompany.com`.
  </Step>

  <Step title="vly shows you the DNS records to add">
    For a subdomain (`app.yourcompany.com`), it's typically:

    | Type | Name | Value |
    | - | - | - |
    | CNAME | `app` | `cname.vly.app` |

    For an apex domain (`yourcompany.com`), it'll be ALIAS / ANAME or A records — see [the apex section below](#apex-domains).
  </Step>

  <Step title="At your DNS provider: add the records">
    Open your DNS provider's dashboard. Find the DNS / Records section for your domain. Add the records vly showed you.

    Provider-specific guides: [Cloudflare](#cloudflare), [Namecheap](#namecheap), [GoDaddy](#godaddy), [Google Domains](#google-domains).
  </Step>

  <Step title="Wait for propagation and SSL">
    DNS propagates within seconds to a few minutes (rarely up to 48 hours). Once vly sees the correct DNS, it requests an SSL certificate from Let's Encrypt — usually completes in 10 seconds.

    The status in vly's dashboard updates from "Pending DNS" → "Pending SSL" → "Active".
  </Step>

  <Step title="Test">
    Open `https://app.yourcompany.com`. You should see your production app, served over HTTPS.

    <Check>
      You're live on your custom domain.
    </Check>
  </Step>
</Steps>

## Apex domains

Apex domains (`yourcompany.com` without a subdomain) can't use CNAME records — DNS rules forbid it. vly supports two options:

<Tabs>
  <Tab title="ALIAS / ANAME (preferred)">
    Some DNS providers (Cloudflare, AWS Route 53, DNSimple, Google Cloud DNS) support ALIAS / ANAME records that act like CNAMEs at the apex.

    | Type | Name | Value |
    | - | - | - |
    | ALIAS / ANAME | `@` | `cname.vly.app` |

    Pick this if your provider supports it.
  </Tab>

  <Tab title="A records">
    For providers without ALIAS support (most legacy providers):

    | Type | Name | Value |
    | - | - | - |
    | A | `@` | `76.76.21.21` |
    | A | `@` | `76.76.21.123` |

    The IPs are anycast — same global routing as CNAME. The downside: if vly ever changes the IPs, you need to update DNS.
  </Tab>
</Tabs>

After adding the records, also add a redirect from `www.yourcompany.com` → `yourcompany.com` (or the reverse, your call). Most DNS providers offer this as a one-click setting.

## Provider-specific guides

### Cloudflare

<Steps>
  <Step title="Add the CNAME">
    DNS → Records → Add record. Type: CNAME. Name: `app` (or your subdomain). Target: `cname.vly.app`. Proxy status: **DNS only** (orange cloud OFF).
  </Step>

  <Step title="If using Cloudflare's proxy">
    For full Cloudflare features (DDoS protection, caching, page rules), you can leave the proxy ON. Just make sure SSL/TLS mode is set to "Full" (not "Flexible") to avoid redirect loops. vly handles SSL on its end; Cloudflare handles SSL between you and the visitor.
  </Step>

  <Step title="For apex domains">
    Cloudflare supports CNAME flattening — you can set a CNAME at the apex and Cloudflare resolves it to A records automatically. So you can use the CNAME approach even for `yourcompany.com`.
  </Step>
</Steps>

### Namecheap

<Steps>
  <Step title="Domain List → Manage → Advanced DNS">
    Click Add New Record.
  </Step>

  <Step title="Add the CNAME">
    Type: CNAME Record. Host: `app` (the subdomain part only). Value: `cname.vly.app.` (note trailing dot). TTL: Automatic.
  </Step>

  <Step title="For apex">
    Namecheap doesn't support ALIAS records. Use the [A record approach](#apex-domains).
  </Step>
</Steps>

### GoDaddy

<Steps>
  <Step title="My Products → DNS → Manage">
    Find the DNS records page for your domain.
  </Step>

  <Step title="Add the CNAME">
    Add → CNAME. Name: `app`. Value: `cname.vly.app`. TTL: 1 hour.
  </Step>

  <Step title="For apex">
    GoDaddy doesn't support ALIAS. Use A records.
  </Step>
</Steps>

### Google Domains / Cloud DNS

<Steps>
  <Step title="DNS → Custom records">
    For Google Cloud DNS, navigate to the zone for your domain.
  </Step>

  <Step title="Add the CNAME">
    Type: CNAME. Name: `app`. Data: `cname.vly.app.`
  </Step>

  <Step title="For apex">
    Cloud DNS supports ALIAS records (called "ALIAS" or "ANAME" in some UIs). For Google Domains, use A records.
  </Step>
</Steps>

## Per-environment domains

You'll often want **production** to use `app.yourcompany.com` and **staging** to use `staging.yourcompany.com`. Set this up:

<Steps>
  <Step title="In vly's project settings">
    **Environments → Production**. Add domain `app.yourcompany.com`.
  </Step>

  <Step title="In the staging environment">
    **Environments → Staging**. Add domain `staging.yourcompany.com`.
  </Step>

  <Step title="Configure DNS for both">
    Add CNAME records for both `app` and `staging`, both pointing to `cname.vly.app`. vly routes by hostname.
  </Step>
</Steps>

## Multiple domains for one environment

You can attach multiple domains to the same deployment:

| Domain | Behavior |
| - | - |
| `app.yourcompany.com` | Primary; canonical |
| `yourcompany.app` | Alias; serves the same content |
| `yourcompany.io` | Redirect to `app.yourcompany.com` (configurable) |

In vly's domain settings, mark one as **Primary** — others become redirects to it (or aliases if you toggle that).

## SSL certificates

vly uses [Let's Encrypt](https://letsencrypt.org) for SSL certificates, automatically:

* **Provisioning** is automatic when DNS resolves correctly.
* **Renewal** is automatic — certs renew 30 days before expiry.
* **No manual cert handling** required.

If you have a custom certificate (extended validation, wildcard from your existing CA):

<Steps>
  <Step title="Settings → Domains → [domain] → Certificate">
    Click "Use custom certificate".
  </Step>

  <Step title="Paste the cert and key">
    Full certificate chain (including intermediate certs) and the private key.
  </Step>

  <Step title="Set up renewal reminders">
    vly doesn't auto-renew custom certs. Set a calendar reminder for 30 days before expiry.
  </Step>
</Steps>

[SSL certificates →](/deployment/ssl-certificates) for the full reference.

## DNSSEC

vly's domain layer is DNSSEC-aware. If your DNS provider supports DNSSEC and you've enabled it on your domain, vly's CNAME / ALIAS resolution honors it correctly. No special configuration on vly's side.

## Common issues

<AccordionGroup>
  <Accordion title="'Pending DNS' for more than an hour" icon="alert-triangle">
    DNS hasn't propagated. Check your records with [dig](https://dig.scryp.com) or [whatsmydns.net](https://whatsmydns.net). Common causes: typo in the CNAME value, wrong record type, or proxied through Cloudflare with the orange cloud ON when it should be OFF.
  </Accordion>

  <Accordion title="'Pending SSL' for more than 30 minutes" icon="alert-triangle">
    Let's Encrypt is rate-limited. If a cert request fails (e.g., DNS hiccup mid-request), Let's Encrypt may delay the next attempt by 1 hour. Wait, then click "Retry SSL" in vly's domain settings.
  </Accordion>

  <Accordion title="Domain works but 'Your connection is not private'" icon="alert-triangle">
    Cert hasn't been issued yet, or your browser cached an old cert. Try incognito; check vly's domain status page.
  </Accordion>

  <Accordion title="Mixed content warning" icon="alert-triangle">
    Some asset on the page (image, script, font) is loaded over `http://` instead of `https://`. Search your code for hardcoded `http://` URLs and switch them to `https://` or protocol-relative `//`.
  </Accordion>

  <Accordion title="Apex redirect not working" icon="alert-triangle">
    If `yourcompany.com` should redirect to `www.yourcompany.com` (or vice versa), configure the redirect at your DNS provider, not in vly. Cloudflare's "Redirect rules" or Namecheap's "URL Redirect" type both work.
  </Accordion>

  <Accordion title="Email stops working after pointing the domain at vly" icon="alert-triangle">
    Domain DNS controls many things — email (MX, SPF, DKIM), web (A, CNAME), other services. **Adding records doesn't remove existing ones**, but if you accidentally deleted MX records, your email will fail. Restore them. vly only needs the CNAME / ALIAS / A records for the specific subdomains it serves.
  </Accordion>
</AccordionGroup>

## Removing a domain

<Steps>
  <Step title="In vly: Settings → Domains">
    Click "Remove" next to the domain. The domain stops serving immediately.
  </Step>

  <Step title="At your DNS provider: remove the records">
    The CNAME / ALIAS / A records you added. If you don't, requests will go to vly's servers and return a 404.
  </Step>

  <Step title="Wait for DNS propagation">
    Old cached entries can take up to TTL to clear (default 1 hour for most providers).
  </Step>
</Steps>

## Related

<CardGroup cols={3}>
  <Card title="DNS setup" icon="globe" href="/deployment/dns-setup">
    Per-provider deep guides.
  </Card>

  <Card title="SSL certificates" icon="shield-check" href="/deployment/ssl-certificates">
    Custom certs, renewals, troubleshooting.
  </Card>

  <Card title="Environments" icon="layers" href="/deployment/environments">
    Per-environment domain routing.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.