DEV Community

Mathew Chan
Mathew Chan

Posted on

How I hosted my website for free on with Cloudflare DNS

So I bought a domain name on Google Domains and connected it to my freely hosted website on

Screenshot 2020-12-04 at 4.42.18 PM tells you to attach a cname record to their website with www. cname, but then I realized users will always have to type www. in front of my domain name to find my website! Not good.

Screenshot 2020-12-04 at 4.47.38 PM

So I added a synthetic record to direct root to www., only to find out that it only works for http and not https. Gasp!

Screenshot 2020-12-04 at 4.47.05 PM

After some digging, to enable SSL I need to find the IPv4 address of the hosted website. Thankfully, a quick Google search brought me to a discussion with people asking the same questions. All you only needed is the command nslookup [your repl's website] to find the server's IP address.

Screenshot 2020-12-04 at 4.45.03 PM

Then I signed up on cloudflare. I expected a lot of work, but the onboarding was super user-friendly. I only needed to enter my domain name and add an A-record pointing to the IP address.

Screenshot 2020-12-04 at 4.52.19 PM

Then I update my domain records on my domain registrar to the ones provided by cloudflare.

Screenshot 2020-12-04 at 4.46.55 PM

Within seconds my domain was working with full SSL! All hail free hosting!

Note: someone mentioned that the IP address might change on, so I've since moved to free hosting on Vercel.

Top comments (0)