DEV Community

Cover image for Domain Linking in Replit Deployments (2024+)
Ruben Roy
Ruben Roy

Posted on

Domain Linking in Replit Deployments (2024+)

Since 2024, linking a domain on Replit has become a bit more complicated. Replit has transitioned its hosting to use the new Deployments system. But i'm here to help you get it sorted out!


Step 1: Create and Prepare Your Repl (if you haven't already)

  1. Create a New Repl: Start by creating a new Repl or using an existing one.
  2. Make Your Project: Make sure your project is ready for deployment.

Creating a Repl

Repl open in Workspace

Step 2: Deploying Your Repl

Open Deployments Pane: Open the "Deployments" pane in your Repl.

Choose Deployment Type: Select from Autoscale, Reserved VM, or Static Deployments based on your project's needs.

Selection of Deployment Types

Configure Deployment: Set up the run and build commands necessary for the application. This makes sure that your Repl will run correctly when deployed.

Deployment Configuration

Deploy Your Repl: Click the "Deploy" button to initiate the deployment process. Your Repl will be accessible via a default replit.app URL.

Repl Deploying

Step 3: Linking a Custom Domain

Access Domain Settings: In the "Deployments" pane, go to the "Settings" tab and find the domain linking section.

Settings tab in Deployments pane

Add Your Domain: Enter your custom domain in the domain linking panel. Replit will provide you with A and TXT records that you need to add to your domain's DNS settings.

Linking a domain

Update DNS Records: Log in to your domain registrar's website and update the DNS records with the provided A and TXT records from Replit.

I use NameCheap as my domain registrar, but the user interface may differ with other registrars.

NameCheap Advanced DNS Tab

Setting up domain link

Verify Domain Linking: Once your DNS changes propagate (this may take a few minutes to 48 hours), return to the Replit Deployments pane. Your domain should show as verified.

Successfully linked domain


FAQ

Which deployment type do I use?

Autoscale Deployment

This is best suited for websites that experience variable traffic. This deployment method scales resources automatically based on the website's real-time demand.

Reserved VM

This is ideal for non-website applications, such as Discord bots, that require consistent, dedicated processing power.

Static Deployment

This is recommended for websites primarily composed of HTML, CSS, and JavaScript. This option is for websites that do not require server-side processing.

Why is my website not linking?

After you update your DNS records on your website, it may take up to 48 hours for the changes to propagate. You can use tools like WhatsMyDNS to monitor the propagation status of your DNS changes.


Happy coding and deploying!

Top comments (0)