How to link your custom domain to your repl!
Hello everyone and today I will be going through how to link your custom domain with your repl with cloudflare being the DNS provider!
Here are what I will be going through today!
- What are domains?
- What is Cloudflare?
- Setting everything up
- Getting the replit code.
- Setting up cloudflare DNS field.
- Linking domain.
The official answer to this question is:
A domain name is an identification string that defines a realm of administrative autonomy, authority or control within the Internet.
In simple terms (I guess xD) and in my own understanding, a domain name is simply an easy way for humans to remember and visit webpages.
Every website has its own unique IP address but you know, humans are bad at remembering things like IP addresses. Like, what is your IP address? xD (DONT COMMENT YOUR IP ADDRESS XD).
So, instead we have domains! When you input a domain, it goes through a Domain Name Server (or a DNS!) which locates the correct IP address for that domain. Which then allows the webpage to be loaded from the IP address.
They are very convenient and is quite cool to own a custom domain. Unfortunately, there are no such things as "free domains" but you can get cheap ones at places such as Google Domains or NameCheap!
So what is cloudflare?
Cloudflare, Inc. is an American web infrastructure and website security company that provides content delivery network services, DDoS mitigation, Internet security, and distributed domain name server services
It basically helps you manage your domain and provides security!
Cloudflare is one of the most popular DNS providers and it is totally free! (well some services aren't xD)
I personally would recommend it as it is very easy to use and gives you lots of information about how your website is doing.
So, how do we setup our custom domain?
For this tutorial, I will be using a HTML repl (just because it already has a screen open), but you can use whatever language you like as long as you're able to get the webpage screen thingy up.
So, getting the code is very simple.
In the heading of the screen, you will see:
- A refresh button
- The domain name that repl have given you
- A pencil button
- An "open new tab" button
Now, you want to click the pencil button as that is how we are going to input our custom domain.
In the "Enter your domain" part, you put in your domain as follows:
- If you have a root domain (e.g. zeliktric.com)
- If you have a subdomain (e.g. tutorial.zeliktric.com)
- Simply type tutorial.zeliktric.com
Cloudflare does not allow you to have something.something.domain.com
- Simply type tutorial.zeliktric.com
Then, a code should appear. Copy it and head to cloudflare.
Now, you want to create a cloudflare account if you haven't done so and head to your domain.
If your domain is not on cloudflare, simply follow the instructions that cloudflare gives you and you should be able to get your domain onto there.
Head over to the
Type, you want to set it to
Name, you want to set it to:
- If you have a root domain
- @ or www
- If you have a subdomain
- tutorial (if it is tutorial.zeliktric.com)
For the target, you put in the code that replit gave you.
AND NOW FOR THE MOST IMPORTANT STEP
Proxy status to
DNS Only (just toggle the toggle (wut xD?))
It should now look something like this:
Hit save and now head back to your repl!
Now you have entered the information onto Cloudflare, click the
Next button on the repl.
Fingers crossed, THIS should appear after 0.idk seconds xD
Link Domain and after a few seconds, THIS should appear on your screen:
YOU'VE SUCCESSFULLY LINKED YOUR CUSTOM DOMAIN TO YOUR REPL!!!
HOLD UR HORSES! We haven't finished yet xD
Head back to Cloudflare and hit
Edit on your field.
Then change the
Proxy Status back to Proxied
Proxied means that the traffic goes through Cloudflare and not to your IP address.
This is why, I think that there were linking issues.
DNS only means that traffic goes straight to your IP address, which in this case is your repl's IP address.
After you have linked, you want it to be Proxied so that traffic goes through Cloudflare and if you're being attacked, Cloudflare will be able to deal with it.
This is why Proxied is turned on by default.
Well, I hope you've learnt something new with this tutorial.
It has worked perfectly for me and it has been great :DDD
Please upvote, not because I want upvotes (I'm inactive on this account anyway xD) but so that more people can link their custom domains with their repls!
Thank you for reading and have a nice day :PPP