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

# Custom Domains

> Learn how to connect your own domain name to your published Replit app.

Custom domains let you assign your domain name, such as `www.my-incredible-app.com` to your Replit published app.
While Replit provides a free subdomain in the format `<your-live-app-subdomain-name>.replit.app`, using
a custom domain lets you create a more memorable address.

A custom domain name can help brand recognition and trust with your app's users.

Watch the following video for a quick overview of setting up Custom Domains:

<Frame>
  <iframe src="https://www.youtube.com/embed/rGYdyb58wJY" title="Custom Domains with Publishing" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />
</Frame>

## Connect a domain with automatic setup

The simplest way to connect a domain is to let Replit set it up for you. When you link a domain you already own, Replit configures the required DNS records on your behalf. You no longer have to copy records into your domain provider by hand.

<Note>
  DNS records are the settings that tell the internet where your domain should point. Setting them up by hand used to be the trickiest part of connecting a domain. Replit now handles this step for you for most domains and providers.
</Note>

<Steps>
  <Step title="Open the Publishing tool">
    After publishing your app, open the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/deploy-icon.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=853c5ef39a8a7ac3648b3a2ce182fcb8" width="16" height="16" data-path="images/icons/deploy-icon.svg" /> **Publishing** tool and select the **Domains** tab.
  </Step>

  <Step title="Enter the domain you want to connect">
    Select **Link a domain** and enter a domain you already own, such as `www.my-incredible-app.com`.
  </Step>

  <Step title="Confirm and let Replit set up your DNS">
    Confirm the connection, and Replit sets up the DNS records for you. You may be asked to sign in to your domain provider so the change can be applied to your account.
  </Step>

  <Step title="Wait for your domain to verify">
    Your domain shows a **Verified** status once setup completes. This usually takes a few minutes. Load the domain in your browser to confirm it works.
  </Step>
</Steps>

<Tip>
  If your provider is not supported for automatic setup, or you prefer to add the records yourself, you can still connect your domain manually. See [Connect a domain manually](#connect-a-domain-manually) below.
</Tip>

## Features

Custom Domains are available for the following Deployment types:

* [Autoscale](/references/publishing/autoscale-deployments/)
* [Reserved VM](/references/publishing/reserved-vm-deployments/)
* [Static](/references/publishing/static-deployments/)

The following table compares Replit's subdomains with custom domains:

| Feature                         | Replit Subdomain   | Custom Domain            |
| :------------------------------ | :----------------- | :----------------------- |
| Hostname customization          | Subdomain only     | Any domain that you own  |
| DNS update time                 | Instant            | Up to 48 hours           |
| Security Certificates (TLS/SSL) | Provided by Replit | Provided by Replit       |
| Price                           | Free               | Pay your domain provider |

## Usage

<Accordion title="How to access Custom Domains">
  1. After publishing your app, open the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/deploy-icon.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=853c5ef39a8a7ac3648b3a2ce182fcb8" width="16" height="16" data-path="images/icons/deploy-icon.svg" /> **Publishing** tool.
  2. Select the **Domains** tab.
  3. Select **Link a domain** or **Manually connect from another registrar** as shown in the following screenshot.

  <Frame>
    <img src="https://mintcdn.com/replit/jSmYU1wBTvl8UMyc/images/deployments/custom-domains/01.png?fit=max&auto=format&n=jSmYU1wBTvl8UMyc&q=85&s=5dc58a0cab37877093e55c9a2b3b1367" alt="Domains tab" width="2422" height="1130" data-path="images/deployments/custom-domains/01.png" />
  </Frame>
</Accordion>

## Connect a domain manually

If your provider is not supported for automatic setup, or you prefer to add the records yourself, follow the steps below to set up your custom domain manually.

<Warning>
  You might experience setup issues if you have one of the following: - Multiple
  `A` records for the same domain name that point to different servers. - `A`
  and `AAAA` records co-exist for the same domain since Replit only supports `A`
  records. - Cloudflare proxied domain records since Replit cannot automatically

  * Multiple `A` records for the same domain name that point to different servers.
  * `A` and `AAAA` records co-exist for the same domain since Replit only supports `A` records.
  * Cloudflare proxied domain records since Replit cannot automatically renew security certificates for that type.
  * A missing or removed `replit-verify` `TXT` record. Replit needs this record to remain in place to renew your SSL/TLS certificate. See [Keep the TXT record in place](#keep-the-txt-record-in-place) below.
</Warning>

<Steps>
  <Step title="Add your custom domain">
    Enter your custom domain name in the text field. You can use a registered domain or include a subdomain.

    For example, `hat-tip.cc` is the registered domain and `my.hat-tip.cc` includes subdomain `my`.

    <Frame>
      <img src="https://mintcdn.com/replit/jSmYU1wBTvl8UMyc/images/deployments/custom-domains/02.png?fit=max&auto=format&n=jSmYU1wBTvl8UMyc&q=85&s=38485a8680fe6ae256ec2d7b0665a784" alt="screenshot of the DNS settings" width="1940" height="718" data-path="images/deployments/custom-domains/02.png" />
    </Frame>
  </Step>

  <Step title="Add the DNS records to your domain registrar">
    Replit generates DNS records that you must provide to your **domain registrar**.
    A domain registrar is the service that manages your domain name, such as GoDaddy or Namecheap.

    Copy the `A` and `TXT` record values from Replit and paste them into your domain registrar's
    DNS management section. If your domain registrar does not support `@` as a hostname, use your registered domain name.

    <Warning>
      **Keep the TXT record in place.** Replit issues and renews the SSL/TLS certificate for your
      custom domain through DNS validation. The `replit-verify=...` `TXT` record must stay in
      your DNS for the full lifetime of the domain — not only during initial setup. If you
      remove or change the record after verification, your next certificate renewal will fail
      and your domain will eventually serve an expired certificate, making your app unreachable
      in browsers. Treat the `TXT` record as permanent alongside your `A` record.
    </Warning>
  </Step>

  <Step title="Optional: Add a subdomain">
    Subdomains — including `www` — are not automatically resolvable when you link your apex
    domain. Each subdomain you want to serve must be added as its own entry in the **Domains**
    tab and given its own DNS records at your registrar.

    To add a subdomain, link it from the **Domains** tab the same way you linked the apex
    domain, then add the DNS records Replit generates for it to your domain registrar.
    For example, to add `my-subdomain.hat-tip.cc`:

    * In the **Publishing** tool, select the **Domains** tab and link `my-subdomain.hat-tip.cc`.
    * At your registrar, add a new `A` record with hostname `my-subdomain` pointing to the IP
      address Replit shows for the new entry.
    * At your registrar, add the matching `replit-verify=...` `TXT` record on hostname
      `my-subdomain` — each subdomain has its own `TXT` record, separate from the apex's.

    <Note>
      **`www` is a subdomain.** Linking `hat-tip.cc` does not automatically serve
      `www.hat-tip.cc`. If you want visitors to reach your app at both `hat-tip.cc` and
      `www.hat-tip.cc`, add `www.hat-tip.cc` as a separate entry in the **Domains** tab and
      `www.hat-tip.cc`, add `www.hat-tip.cc` as a separate entry in the **Domains** tab and
      publish the `A` and `TXT` records it generates on hostname `www`. Most builders who want
      a `www` address also configure a redirect from the apex to `www` (or vice versa) at
    </Note>

    As with the apex domain, the `replit-verify=...` `TXT` record you add for each subdomain
    must stay in DNS permanently. See
    [Keep the TXT record in place](#keep-the-txt-record-in-place) below.
  </Step>

  <Step title="Wait for DNS propagation to complete">
    After adding the records, you must wait for them to propagate online.
    This can take between a few minutes and 48 hours.

    When the propagation completes, your Domains tab should show the "Verified" status next to the domain name as shown below:

    <Frame>
      <img src="https://mintcdn.com/replit/jSmYU1wBTvl8UMyc/images/deployments/custom-domains/domain-verified.png?fit=max&auto=format&n=jSmYU1wBTvl8UMyc&q=85&s=fe5c99d84ff0334119d2e94b2f07c99a" alt="screenshot of the verified domain status" width="1866" height="890" data-path="images/deployments/custom-domains/domain-verified.png" />
    </Frame>

    Load the domain in your browser to verify that it works.
  </Step>
</Steps>

## Troubleshooting

### Keep the TXT record in place

Replit issues and renews the SSL/TLS certificate for each custom domain through DNS validation, which depends on the `replit-verify=...` `TXT` record you added during setup. The `TXT` record is not a one-time setup artifact — it must stay in your DNS for the full lifetime of the domain. If the record is removed, edited, or replaced after your domain is verified, the next renewal will fail silently and the existing certificate will eventually expire. Visitors will then see a browser security warning and the app will be unreachable.

If older domains on your account suddenly show certificate errors while newer ones work, a missing or modified `TXT` record is the most likely cause.

To restore an affected domain:

1. Open the **Publishing** tool and select the **Domains** tab.
2. Confirm the `replit-verify=...` `TXT` record Replit shows for the domain.
3. Add the `TXT` record back at your domain registrar exactly as shown, including the hostname and value.
4. Remove the domain in Replit and add it again to trigger a fresh issuance.
5. Wait for DNS propagation and re-check the **Verified** status on the **Domains** tab.
