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

# Set Up a Custom Domain

> Point your own domain name to your Hiveku site

Your project starts at `{project}.hiveku.com`, but most real sites run on a custom domain like `yoursite.com`. Here's how to connect one.

## Run the Domain Setup Wizard

<Steps>
  <Step title="Open Custom Domains">
    In your project, go to **Settings > Custom Domains**.
  </Step>

  <Step title="Start the wizard">
    Click **Start Domain Setup Wizard**.
  </Step>

  <Step title="Pick a tier">
    Pick which environment this domain is for:

    * **Production** — your live public site
    * **Staging** — pre-release testing
    * **Development** — internal / early dev

    Most users set up Production first.
  </Step>

  <Step title="Enter your domain">
    Type the domain you want:

    * `www.example.com` — subdomain (easiest)
    * `example.com` — apex domain (needs extra setup, see below)

    Click **Next**.
  </Step>

  <Step title="Copy the CNAME record">
    Hiveku shows you a DNS record to add. It looks like:

    ```
    Type:  CNAME
    Name:  www
    Value: proxy.hiveku.com
    ```

    Copy the **Value**.
  </Step>

  <Step title="Add the CNAME at your DNS provider">
    Log into wherever you bought your domain (GoDaddy, Namecheap, Cloudflare, Route 53, etc.) and add the CNAME record in your DNS settings.
  </Step>

  <Step title="Verify DNS">
    Back in the wizard, click **Verify DNS Configuration**. Hiveku checks that the CNAME resolves correctly.
  </Step>

  <Step title="Wait for SSL">
    After DNS verifies, SSL auto-provisions — usually within a few minutes. When it finishes, your domain is live over HTTPS.
  </Step>
</Steps>

## Apex Domains (`example.com`)

Apex domains (no `www.` prefix) don't support CNAME records at the root in most DNS systems. You have two good options:

<Tabs>
  <Tab title="Use CNAME flattening">
    Some DNS providers (Cloudflare, DNSimple, Namecheap's premium DNS) support **CNAME flattening** at the apex. Add the Hiveku CNAME at `@` — the provider handles the rest.
  </Tab>

  <Tab title="Redirect from apex to www">
    Set up a redirect from `example.com` → `www.example.com` in your DNS provider, then add the CNAME for `www` as usual. Most registrars have a one-click URL redirect option.
  </Tab>
</Tabs>

## Cloudflare Users — Read This

Cloudflare adds a wrinkle because of its proxy. Follow one of these paths:

<Warning>
  If you use Cloudflare's proxy (the orange cloud), you MUST either:

  1. Set the record to **DNS only (gray cloud)** — simplest, Hiveku handles SSL
  2. Keep the proxy on but set Cloudflare's SSL mode to **Full (strict)** — otherwise you'll get redirect loops or cert errors
</Warning>

To change SSL mode: Cloudflare dashboard → SSL/TLS → Overview → set mode to **Full (strict)**. Never use **Flexible** with Hiveku.

## DNS Propagation Times

Expect **15 minutes to 48 hours** for DNS to propagate globally. Most propagation happens in the first 30 minutes.

Check progress with [dnschecker.org](https://dnschecker.org) — enter your domain and record type (CNAME) to see it resolve worldwide.

## Multiple Domains Per Tier

You can attach multiple domains to the same tier. One is marked **Primary**; the others redirect to it.

<Steps>
  <Step title="Add each domain">
    Run the wizard once per domain.
  </Step>

  <Step title="Pick the primary">
    In **Settings > Custom Domains**, click the star icon next to the domain you want as primary. All others redirect to it.
  </Step>
</Steps>

Common use case: `example.com`, `www.example.com`, and `getexample.com` all redirect to `www.example.com`.

## Removing a Domain

To detach a domain:

<Steps>
  <Step title="Open Custom Domains">
    Go to **Settings > Custom Domains**.
  </Step>

  <Step title="Click the trash icon">
    Next to the domain row, click **Remove**.
  </Step>

  <Step title="Confirm">
    The domain stops serving your site. Your Hiveku subdomain (`{project}.hiveku.com`) still works, so this is safe.
  </Step>
</Steps>

<Info>
  After removing, you can delete the CNAME from your DNS provider too — though it doesn't hurt to leave it.
</Info>

## Verifying Your Domain

After SSL provisioning finishes:

1. Visit `https://yourdomain.com` in a browser
2. Confirm the padlock shows (SSL is live)
3. Confirm you see your site, not a 404 or error
4. Hard-refresh (Cmd+Shift+R / Ctrl+Shift+R) to bypass cache

## Troubleshooting

<AccordionGroup>
  <Accordion title="DNS verification fails">
    Most common cause: the CNAME hasn't propagated yet. Wait 15-30 minutes and retry. Confirm the record at [dnschecker.org](https://dnschecker.org) — the value should match what Hiveku showed you.
  </Accordion>

  <Accordion title="SSL error in browser">
    Usually a Cloudflare proxy issue. Set Cloudflare's SSL mode to **Full (strict)** or turn the proxy off (gray cloud). Flexible SSL causes mixed-content and redirect-loop errors.
  </Accordion>

  <Accordion title="Redirect loop (ERR_TOO_MANY_REDIRECTS)">
    Classic Cloudflare Flexible SSL symptom. Switch Cloudflare SSL mode to **Full (strict)** in the SSL/TLS section.
  </Accordion>

  <Accordion title="Apex domain (example.com) won't connect">
    Apex doesn't support CNAME in standard DNS. Either use a DNS provider with CNAME flattening (Cloudflare, DNSimple), or set up a redirect from apex to `www.` and only connect `www.`.
  </Accordion>

  <Accordion title="Domain works, but only without www (or vice versa)">
    Each hostname is separate. Add both `example.com` and `www.example.com` in the wizard, then pick one as primary so the other redirects.
  </Accordion>

  <Accordion title="I updated DNS but it still doesn't work after hours">
    Verify the record is really there and valid. Some registrars add a period (`proxy.hiveku.com.`) or drop the protocol — check what [dnschecker.org](https://dnschecker.org) shows vs. what Hiveku expects. If they don't match, fix the record.
  </Accordion>
</AccordionGroup>

## What's Next?

<CardGroup cols={2}>
  <Card title="Deploy your site" icon="rocket" href="/how-tos/deploy-site">
    Push changes live
  </Card>

  <Card title="Custom Domains reference" icon="book" href="/publishing/custom-domains">
    Full technical reference
  </Card>
</CardGroup>
