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

# Connect an existing domain

> Connect a domain you own to your Hercules app. Add DNS records at your registrar. Diagnostics tool for troubleshooting.

Connect a domain you already own (like `myapp.com`) to your Hercules app for a professional branded experience.

<div className="screenshot fire">
  <img src="https://mintcdn.com/zeus-0f6dadbf/61uieMGEmmAltaaY/images/apps/domains-redirect.png?fit=max&auto=format&n=61uieMGEmmAltaaY&q=85&s=acbd4d98f4e466bb47251252da1e50aa" alt="Domain redirect settings" width="1088" height="664" data-path="images/apps/domains-redirect.png" />
</div>

### How do I connect an existing domain?

Go to the **Domains** tab, click **Add Domain** under the "Connect an existing domain" section, then enter your domain name.

<div className="screenshot ocean">
  <img src="https://mintcdn.com/zeus-0f6dadbf/61uieMGEmmAltaaY/images/apps/domains-connect-existing-domain.png?fit=max&auto=format&n=61uieMGEmmAltaaY&q=85&s=2c4633795665bda23fd1e56389ef03ea" alt="Connect an existing domain dialog" width="1198" height="680" data-path="images/apps/domains-connect-existing-domain.png" />
</div>

### What are DNS records? Where/How do I add them?

You purchase your domain at a domain registrar (like GoDaddy, or Name.com). You build and host your app with Hercules. You use DNS records to connect your domain to Hercules so the internet knows where to find your website.

You must set up your DNS records following the instructions we give you:

| Type  | Name                  | Value                                 |
| ----- | --------------------- | ------------------------------------- |
| A     | `@`                   | `104.18.220.38`                       |
| CNAME | `www`                 | `cname.onhercules.app`                |
| CNAME | `_acme-challenge`     | `<your-unique-acme-challenge-value>`  |
| TXT   | `_cf-custom-hostname` | `<your-unique-custom-hostname-value>` |

<div className="screenshot ocean">
  <img src="https://mintcdn.com/zeus-0f6dadbf/vyfZOWPi9KdyCPiO/images/apps/domains-dns-pending.png?fit=max&auto=format&n=vyfZOWPi9KdyCPiO&q=85&s=59eefaa8763bf86b11e9c37a4ca367c8" alt="DNS configuration" width="2314" height="864" data-path="images/apps/domains-dns-pending.png" />
</div>

### Will this work for `www` too?

Yes. When setting up your domain, you can choose to have all subdomains redirect to your root domain (e.g. `www.myapp.com` would redirect to `myapp.com`).

<div className="screenshot fire">
  <img src="https://mintcdn.com/zeus-0f6dadbf/61uieMGEmmAltaaY/images/apps/domains-redirect.png?fit=max&auto=format&n=61uieMGEmmAltaaY&q=85&s=acbd4d98f4e466bb47251252da1e50aa" alt="Domain redirect settings" width="1088" height="664" data-path="images/apps/domains-redirect.png" />
</div>

### My domain isn't working, what do I do?

Click **Having trouble connecting a domain?** to open the diagnostics tool. This will check your DNS configuration and show you exactly what's wrong. The diagnostics will identify common issues like incorrect DNS record types, missing DNS records, or DNS propagation delays.

<div className="screenshot fire">
  <img src="https://mintcdn.com/zeus-0f6dadbf/vyfZOWPi9KdyCPiO/images/apps/domains-having-trouble.png?fit=max&auto=format&n=vyfZOWPi9KdyCPiO&q=85&s=f4e9dc61455af82c7b1b23a7d3091b54" alt="Having trouble connecting a domain" width="1082" height="110" data-path="images/apps/domains-having-trouble.png" />
</div>

<div className="screenshot rain">
  <img src="https://mintcdn.com/zeus-0f6dadbf/vyfZOWPi9KdyCPiO/images/apps/domains-error-diagnostics.png?fit=max&auto=format&n=vyfZOWPi9KdyCPiO&q=85&s=63e085f79833a4c381ce5f0ae4f9a39b" alt="Domain diagnostics" width="2930" height="1664" data-path="images/apps/domains-error-diagnostics.png" />
</div>

If your domain still isn't working even when all checks are green, click "Support & feedback" inside of Hercules and a member of the Hercules team will help.

### Can I connect multiple domains to the same app?

Yes. You can connect as many domains as you'd like to a single app. All domains will show the same content.

## Additional FAQ

<AccordionGroup>
  <Accordion title="Want to buy a new domain instead?">
    You can purchase and register a domain directly inside Hercules with no DNS setup required. See
    [Buy a domain in Hercules](/apps/publish/buy-domain).
  </Accordion>

  <Accordion title="How long will it take for my domain to start working?">
    Usually within minutes, but DNS changes can take up to 48 hours to fully propagate. If your
    domain isn't working after a few hours, use the diagnostics tool to check your configuration.
  </Accordion>

  <Accordion title="Can I set up wildcard routing for custom subdomains?">
    No. Hercules does not currently support wildcard subdomains. You'll need to add each subdomain
    individually.
  </Accordion>

  <Accordion title="My domain isn't work on my device but works on someone else's?">
    This is usually a DNS caching issue. Try clearing your browser cache, flushing your DNS cache,
    or waiting a few hours. Different ISPs and devices cache DNS records for different amounts of
    time.
  </Accordion>

  <Accordion title="I'm getting a Cloudflare 1016 error">
    This error happens when your domain is connected to Hercules and also has a Cloudflare Zone set
    up. It usually affects the `www.` subdomain, not the root domain. For example, if `abc.com`
    works but `www.abc.com` shows a 1016 error, you probably have a Cloudflare Zone for `abc.com`.
    To fix this, either remove the Cloudflare Zone for `abc.com` or don't set up the `www.` redirect
    in Hercules.
  </Accordion>

  <Accordion title="Chrome shows &#x22;Deceptive site ahead&#x22; or &#x22;Dangerous site&#x22; on my domain">
    This is a Google Safe Browsing warning, most commonly triggered on brand-new domains. The flag
    is on your registered domain and clears once you submit a review request through Google Search
    Console. See [Google Safe Browsing warnings on your domain](/apps/publish/domain-warnings).
  </Accordion>
</AccordionGroup>
