Skip to content
← Back to Community
Link Domains with Replit
Profile icon
h
has Hacker Plan
CoolCoderSJ

Yes, there is already a tutorial...but that tutorial isn't very clear, it doesn't show cloudflare thingies, but most of all, things have changed. Namely the fact that linking a domain has gotten harder for some reason... ;)
This tutorial will show you how to link a domain from scratch.

I highly recommend getting a domain from a domain provider that isn't freenom, but since the majority of the community uses freenom, that's what this tutorial will use.

Part 1: Find your domain

Step 1: Head on over to Freenom, click in the big search bar in the middle of the page, enter your domain, and click enter.
image
image

Next to the domain you want, click Get it now!
image

Click checkout

image

Select forward this domain, enter your current replit domain, and on the right, select @12 Months Free
image

Click continue

Now, if you don't have an account, enter your email to verify it.

Note: Only GMAIL is allowed lmao idk why

If you have an account, use Google OAUTH to login.

Signup


If you choose to signup, check for an email for email confirm. Click the link inside of it, and fill out the info.

DO NOT GIVE IT YOUR SENSITIVE DATA, SUCH AS ADDRESSES/FULL NAMES

Just fill in some fake stuff as freenom isnt that trustworthy.

Login

If you choose to login, it will redirect you to some random page. Click here to go to your cart and proceed to checkout.

image

Agree to terms and complete order.
Now click here to go to your domains dashboard.

Part2: Setting it up with Cloudflare

For it to work with replit, it must be linked with cloudflare or another domain provider. Next to your domain, click Manage Domain.

On the menu bar, click Management tools > Nameservers and select Use default Nameservers.

image

Click Use Custom Nameservers and pause...
In another tab, open Cloudflare

Either Login or signup from the navigation bar

Once you're logged in, check the navbar top right for a link to add a domain.
Click that link.

iamge

Enter your domain and click Add site.
NOTE: It may take multiple tries and a lot of time before it works.

Once it actually loads, scroll down and select the free plan, unless you want to pay for cloudflare pro.
image

Click continue

Wait for it to scan existing DNS records, it should find none.

Option 1: Root and WWW

Click Add record (We will be doing these steps twice)

From the dropdown, select CNAME

Set the name of the record as @. This is the root domain, so for example, Google has these two CNAME records,

google.com, and www.google.com

If you do not add a root record, you would have to add www in front of it every time.

NOW PAUSE

Go to the repl you are linking

Click the pencil icon next to the domain on replit

image
Enter the domain you are linking, enter the domain without the www. (Example - replitiscool.tk)

image

Click the COPY button

Now head back to cloudflare and enter the copied ur into the target box.

Click Save, then add another record. Select CNAME from the dropwdown, name the record as www, and paste the text replit gave u into the target.

Option 2: Subdomains

Go to the repl you are linking

Click the pencil icon next to the domain on replit

image
Enter the domain you are linking, including subdomain. (Example - project.replitiscool.tk)

Click the COPY button

Now head back to cloudflare and enter the copied ur into the target box.
Click Save.

Next...

Click continue.

It might give you some NAMESERVERS and tell you to update nameservers. IF that is the case, go back to freenom, (Click here) manage domain > Management tools > nameservers
Click use custom nameservers, then enter the nameservers cloudflare gave you. Click Save, and click continue on cloudflare.

On the top bar, click SSL/TLS
image
Choose Full, it should be the second to last option.

Finally...

GO back to replit and click next. after some time, a LINK DOMAIN button should appear.

Click it, and voilà! You have successfully linked your domain.

EDIT:

On your first try, you may get a 525 SSL Handshake error, if you do, be patient, wait a bit, and reload. It takes a bit to update.

Voters
Profile icon
NxMontasx
Profile icon
ManishKumar150
Profile icon
PixelTortoise
Profile icon
CosmicBear
Profile icon
Atias
Profile icon
ch1ck3n
Profile icon
Jeydin21
Profile icon
Chewyblockguy
Profile icon
GolaaaN
Profile icon
firedragondnd
Comments
hotnewtop
Profile icon
JamieAleman

My replit says
Waiting to reach replit through your domain. This can take up to 48 hours. Feel free to check back later.

Do i just wait?

Profile icon
CoolCoderSJ

@JamieAleman Yeah so basically wait a few hours, come back, and when you try linking it again it should be near instant.

Profile icon
RowanFromBJC

DO NOT GIVE IT YOUR SENSITIVE DATA, SUCH AS ADDRESSES/FULL NAMES

Now I live on 123 Sesame Street

Great tutorial, works really well!

Profile icon
CoolCoderSJ

@RowanFromBJC lol
thanks, i just felt like a new tutorial was needed

Profile icon
mrslep

@RowanFromBJC omg elmo

Profile icon
SamiaMin

hi can you rate my first quiz !!

Profile icon
Bookie0

voila

non non non!

c'est voilà!!!!

smh

Profile icon
CoolCoderSJ

@Bookie0 smh how did i miss that

Profile icon
Bookie0
Profile icon
S376-VladimirVo

image
is this normal wjhen the site isn't linked to replit yet? everything else is setup it's just going through the 48 hour wait phase.

Profile icon
andrewdaukas

For some reason it has been saying this for more than 2 daysimage

Profile icon
andrewdaukas

@CoolCoderSJ help pls

Profile icon
PixelTortoise

dang thanks

Profile icon
Spikycord

Unsupported protocol
The client and server don't support a common SSL protocol version or cipher suite.

Profile icon
il798li

image
Is this what you meant by the below image?

image

Profile icon
CoolCoderSJ
Profile icon
il798li

Thanks!

Profile icon
il798li

This is quite confusing, can you make a video?

Profile icon
CoolCoderSJ

@il798li sure, in a while

Profile icon
[deleted]

Thanks...

Profile icon
ruiwenge2

for some reason every domain that find says "not available"

Profile icon
arjun418

@ruiwenge2 Same for me I wonder why

Profile icon
ruiwenge2

@arjun418 its crazy

Profile icon
arjun418

@ruiwenge2 I know right! I was hoping to get a free domain for my website

Profile icon
ruiwenge2
Profile icon
arjun418

Ive tried every website there is @ruiwenge2

Profile icon
ruiwenge2

@arjun418 same for me!

Profile icon
arjun418

@ruiwenge2 MAN! It just worked! Add the back of you domain to get it to work

ex: instaed of hello search hello.tk

Profile icon
ruiwenge2

@arjun418 lucky... i typed in hello.tk, and every domain that i found (.tk, .ml, .ga, .cf, .gq, etc) wasn't available :(

Profile icon
ruiwenge2

@arjun418 wait, it worked!!!!!!! thank you!

Profile icon
arjun418

@ruiwenge2 dont do hello and stuff do something original

Profile icon
ch1ck3n

ok now i'm getting "cknlinks.tk redirected you too many times"

Profile icon
CoolCoderSJ

@ch1ck3n set SSL to full to fix that.

Profile icon
ch1ck3n
Profile icon
ch1ck3n

@CoolCoderSJ YAAAAAAAAAY IT WORKSSS

Profile icon
ch1ck3n

ok i have a problem (maybe)

i click "link domain" on replit and it says linking domain... but like in one second it changes back to the normal button. is that normal

Profile icon
CoolCoderSJ

@ch1ck3n yeah its a bit broken, use an autoclicker.

Profile icon
CubeyTheCube

My domain randomly gives 525 and 502 errors a lot of the time... and I have no idea why. I set the SSL to Full.

Profile icon
CoolCoderSJ

@CubeyTheCube 525 is normal a couple of times, not too many- 502 is an application error, not cloudflare or your domain.

Profile icon
CubeyTheCube

@CoolCoderSJ My website has been up for a month, and this started happening 2 days ago with no changes to the code.

Profile icon
Chewyblockguy

do you have to do the nameserver stuff on cloudflare?

Profile icon
CoolCoderSJ

@Chewyblockguy yes, if you dont do the nameserver stuff cloudflare wont activate, and domains on replit doesnt work without cloudflare anymore.

Profile icon
Chewyblockguy

I had no idea you could get a free domain name! thanks sooooooooo much

Profile icon
CoolCoderSJ

@Chewyblockguy While you can get free domains, freenom is heavily recommended against, because they technically own all domains, you get ZERO SEO, and they can resell your domain whenver they want. If your domain becomes too popular, it gets suspended until you pay.

Profile icon
Chewyblockguy

@CoolCoderSJ whelp if I ever have a ton of veiws Ill just add ads so I can get a .com namecheap domain = P

Profile icon
CoolCoderSJ

@Chewyblockguy lmao

Also freenom can place ads on ur site if they want without asking u, but the money goes to them...\

Profile icon
ch1ck3n

@CoolCoderSJ :O i have no problem with ads on my site

ads make it look professional hehehehe

Profile icon
isaiah08

image

Profile icon
CoolCoderSJ

@isaiah08 did you do all of the steps? Especially setting SSL to Full?

Profile icon
isaiah08

Thanks! I must have forgotten to do that! @CoolCoderSJ

Profile icon
CoolCoderSJ

@isaiah08 yeah lol np