Learn to Code via Tutorials on Repl.it!

← Back to all posts
Link Domains with Replit
CoolCoderSJ

How to link a domain with Replit

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.

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

Click checkout

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

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.

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.

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.

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.

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


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

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


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

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
CosmicBear
Atias
ch1ck3n
Jeydin21
Chewyblockguy
GolaaaN
firedragondnd
mkhoi
isaiah08
RemiixInc
Comments
hotnewtop
SamiaMin

hi can you rate my first quiz !!

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!

CoolCoderSJ

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

mrslep

@RowanFromBJC omg elmo

Bookie0

voila

non non non!

c'est voilà!!!!

smh

CoolCoderSJ

@Bookie0 smh how did i miss that

Bookie0

hum HUM @CoolCoderSJ

Spikycord

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

il798li


Is this what you meant by the below image?

CoolCoderSJ
il798li

Thanks!

il798li

This is quite confusing, can you make a video?

CoolCoderSJ

@il798li sure, in a while

[deleted]

Thanks...

ruiwenge2

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

arjun418

@ruiwenge2 Same for me I wonder why

ruiwenge2

@arjun418 its crazy

arjun418

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

ruiwenge2
arjun418

Ive tried every website there is @ruiwenge2

ruiwenge2

@arjun418 same for me!

arjun418

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

ex: instaed of hello search hello.tk

ruiwenge2

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

ruiwenge2

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

arjun418

@ruiwenge2 dont do hello and stuff do something original

ch1ck3n

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

CoolCoderSJ

@ch1ck3n set SSL to full to fix that.

ch1ck3n
ch1ck3n

@CoolCoderSJ YAAAAAAAAAY IT WORKSSS

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

CoolCoderSJ

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

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.

CoolCoderSJ

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

CubeyTheCube

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

Chewyblockguy

do you have to do the nameserver stuff on cloudflare?

CoolCoderSJ

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

Chewyblockguy

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

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.

Chewyblockguy

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

CoolCoderSJ

@Chewyblockguy lmao

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

ch1ck3n

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

ads make it look professional hehehehe

isaiah08

CoolCoderSJ

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

isaiah08

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

CoolCoderSJ

@isaiah08 yeah lol np