Get a Custom Domain for your Replit Repl!

Repl Talk Badge

Introduction

Do you dislike your long repl.co domain? Or, do you want a more memorable one? Well, whatever the reason, this tutorial is for you!

There are many tutorials for this, but most of them are outdated and no longer work. So, I thought I would create my own accurate tutorial!

Let's get started!

Creating your Repl

Well, I'll assume you already have a repl that hosts a web application.

Repl

So, onto the next step!

Getting a Domain

Well, you obviously need a domain to add a custom domain to your repl! For this tutorial, I'll be getting a free domain from Freenom, but you can get yours from anywhere.

Choosing your Domain

We're going to be getting a domain from Freenom.

Search for a domain you would like and click Get it now!, then Checkout Freenom is very slow to load. Be patient!

If you can't use the Get it now! button, search for the domain with the extension on the end.

Freenom Search

"Buy" your domain

Select the period you would like from the PERIOD dropdown. I recommend 12 months @ FREE if you want it for free. Then, click Continue. Now, complete your order after agreeing to the Terms and Conditions.

Freenom Domain Period

If you have never used Freenom before, you will be asked to create an account. Do this, and I'll see you on the next step.

Managing Domains

You can manage all of your domains under My Domains

Freenom Order Confirmation

Now, select your domain.

Freenom Domain Management

Setting up your Domain with Cloudflare

Now, we'll add our domain to Cloudlfare. You don't have to do this, though your website will be faster and more secure if you do do this. And it's free, so why not?

So, create or sign into a Cloudflare account.

Adding our site to Cloudflare

Now, we need to tell Cloudlflare what our domain is, and prove that it is ours.

Add domain to Cloudflare

Now, select a plan. I'll use Free.

It will scan for DNS records, and now is the time to link our domain to our repl.

Linking to your Repl

Go back to your repl. Click the pencil icon on the web preview and enter your domain.

Replit will give you a CNAME record. Copy that, because we will need it for the next step.

Go ahead and press Next

Make sure you keep the repl open or the linking process will stop.

Replit Linking Page

Adding CNAME Records

Add a new record with the type being CNAME, the name being @ and the target is what you copied from Replit.

Add CNAME record gif

Changing Nameservers

The penultimate step is here. We need to change our domain's nameservers for use with Cloudflare.

The nameservers you are given are random, and won't be the same every time. So, don't copy my ones, or ones that you have had in the past.

Update namservers gif

Now, link your domain on Replit.

Replit Confirm Link

Changing Security

The final thing to do, is to change some Cloudflare security settings. You won't be able to access your website if you don't do this.

Go through the Quick Start Guide turning everything On. This isn't necessary, but it provides a better experience to the visitors of your website.

Cloudflare Quickstart gif

Now, you need to go to SSL and select Full(Strict)

Cloudflare SSL gif

Finished!

We're all finished setting up our domain now. Head over to your URL, and give it a go!

I have been using this repl: @DillonB07/Custom-Domain-Demo and this domain: https://customdomaindemo.ml

My site! Repl Talk Badge
Back