Get a Custom Domain for your Replit Repl!
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.
- If you are in a team, you must be the owner of the team to do this!
- For a multiplayer repl, you need to be the owner of the 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
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.
"Buy" your domain
Select the period you would like from the
PERIOD dropdown. I
12 months @ FREE if you want it for free. Then, click
Continue. Now, complete your order after agreeing to the Terms
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.
You can manage all of your domains under
Now, select your domain.
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.
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
Make sure you keep the repl open or the linking process will stop.
Adding CNAME Records
Add a new record with the type being
CNAME, the name being
@ and the target is what you copied from Replit.
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.
Now, link your domain on Replit.
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
This isn't necessary, but it provides a better experience to the visitors
of your website.
Now, you need to go to SSL and select Full(Strict)
We're all finished setting up our domain now. Head over to your URL, and give it a go!