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)
- Create a New Repl: Start by creating a new Repl or using an existing one.
- Make Your Project: Make sure your project is ready for deployment.
Step 2: Deploying Your Repl
1· Open Deployments Pane: Open the "Deployments" pane in your Repl.
2· Choose Deployment Type: Select from Autoscale, Reserved VM, or Static Deployments based on your project's needs.
3· Configure Deployment: Set up the run and build commands necessary for the application. This makes sure that your Repl will run correctly when deployed.
4· Deploy Your Repl: Click the "Deploy" button to initiate the deployment process. Your Repl will be accessible via a default replit.app URL.
Step 3: Linking a Custom Domain
1· Access Domain Settings: In the "Deployments" pane, go to the "Settings" tab and find the domain linking section.
2· 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.
3· 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.
4· 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.
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)