Link Domains with Replit
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.
DO NOT GIVE IT YOUR SENSITIVE DATA, SUCH AS ADDRESSES/FULL NAMES
Now I live on 123 Sesame Street
Great tutorial, works really well!
@RowanFromBJC lol
thanks, i just felt like a new tutorial was needed
@RowanFromBJC omg elmo
hi can you rate my first quiz !!
voila
non non non!
c'est voilà!!!!
smh
@Bookie0 smh how did i miss that
hum HUM @CoolCoderSJ
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.
For some reason it has been saying this for more than 2 days
@CoolCoderSJ help pls
dang thanks
Unsupported protocol
The client and server don't support a common SSL protocol version or cipher suite.
This is quite confusing, can you make a video?
@il798li sure, in a while
Thanks...
for some reason every domain that find says "not available"
@ruiwenge2 Same for me I wonder why
@ruiwenge2 I know right! I was hoping to get a free domain for my website
Ive tried every website there is @ruiwenge2
@ruiwenge2 MAN! It just worked! Add the back of you domain to get it to work
ex: instaed of hello search hello.tk
@ruiwenge2 dont do hello and stuff do something original
ok now i'm getting "cknlinks.tk redirected you too many times"
@ch1ck3n set SSL to full to fix that.
@CoolCoderSJ YAAAAAAAAAY IT WORKSSS
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
@ch1ck3n yeah its a bit broken, use an autoclicker.
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.
@CubeyTheCube 525 is normal a couple of times, not too many- 502 is an application error, not cloudflare or your domain.
@CoolCoderSJ My website has been up for a month, and this started happening 2 days ago with no changes to the code.
do you have to do the nameserver stuff on cloudflare?
@Chewyblockguy yes, if you dont do the nameserver stuff cloudflare wont activate, and domains on replit doesnt work without cloudflare anymore.
I had no idea you could get a free domain name! thanks sooooooooo much
@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.
@CoolCoderSJ whelp if I ever have a ton of veiws Ill just add ads so I can get a .com namecheap domain = P
@Chewyblockguy lmao
Also freenom can place ads on ur site if they want without asking u, but the money goes to them...\
@CoolCoderSJ :O i have no problem with ads on my site
ads make it look professional hehehehe
@isaiah08 did you do all of the steps? Especially setting SSL to Full?
Thanks! I must have forgotten to do that! @CoolCoderSJ
@isaiah08 yeah lol np
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?
@JamieAleman Yeah so basically wait a few hours, come back, and when you try linking it again it should be near instant.