How I put my repl on a free custom domain!!!
Ok so I created https://slight.gq, which is my URL shortener. But the process was long and tricky to get right so I thought I'd share.
Step 1: Make your repl
Just make a repl or something you want to host.
Step 2: Get your domain
Go to https://freenom.com and create an account and register a domain. It's super simple. Once you have your domain click "manage domain":
Now go to "name servers":
Leave this tab open and continue to the next step.
Step 3: Register on cloudfare
Step 4: Add cloudfare nameservers.
Step 5: Connect to your repl
In your repl click add custom domain (the pencil icon) and then add your website (without https or www) and then copy the some-hash-here.repl.co thing it gives you. Now go back to your cloudfare tab and go to DNS:
Now you want to add a CNAME record to your DNS:
IMPORTANT make sure you click the "proxied" icon so it changes to "DNS only" this is important to make sure your website doesn't infinite loop (idk why it did this). Also if you want just https://yoursite.whatever instead of https://www.yoursite.whatever replace "www" with "@".
Now add that record and go back to the repl page and click "next" then "finish linking" and wait for it to link.
🎉 ALL DONE!!!! 🎉
Now you have a custom website! Post a comment if you want help with something!