Custom Domains with Deployments
Connecting Your Domain To Your Deployment
First, open the Deployment you want to connect to your custom domain.
In the Deployments pane, under Settings, find the "Domains" section.
Click the "Link a domain" button, and enter your domain name in the provided field (e.g., mydomain.com). Click "Next" to proceed.
Replit will automatically generate the necessary DNS records for your domain:
- An A record pointing to your Repl
- A TXT record to verify that you own the domain
Adding DNS Records to your Domain Registrar
After copying these records, you will need to log in to your domain registrar (e.g., GoDaddy, Namecheap) and navigate to the DNS management section for your domain.
Add the DNS records (A record and TXT record) provided by Replit and save the changes in your domain registrar.
I am using Hover for DNS management in this tutorial, but it should be comparable to any other DNS manager.
Enter @ for hostname and the IP address from your deployments settings panel.
Name Field
The name is your subdomain prefix, such as kaboom
(e.g.: kaboom.thedevbird.com
) or your root domain: example.com
.
Target Field
The target is what the record will point to, usually the IP you copied from the domain linking panel.
Return to Replit and click "Link domain."
Waiting for DNS Propagation
The time to fully propagate DNS changes can range from a few minutes to about 24-48 hours. We recommend using a tool such as https://whatsmydns.net/ to keep track of the DNS propagation. All you need to do is input your custom domain (tutorial.thedevbird.com
in this case) and select the DNS record type you want to check.
In the screenshots below, you can see how quickly the TXT record propagated. In contrast, when making this tutorial, the A record had only propagated to one primary DNS server in the same time span.
The key to linking your domain is patience. Your Repl won't be able to connect to your custom domain until the DNS records are propagated all the way through.
We Have Liftoff!
Once your DNS records have been fully propagated, you can check back on the Domains tab for your Deployment, which should show that your domain has been verified:
If you don't see this, please send a support ticket via https://replit.com/support and make sure to include a screenshot of your DNS records, the custom domain you want to link, and the link to your Repl.