Use domain and SSL — Godaddy and Cloudflare

Ming-chiao Wu Jojo
2 min readApr 2, 2023

--

After I could deploy my nextjs project to AWS EC2

I need to update the access address from EC2 public IP to a more readable domain.

Therefore I go to Godaddy to buy a relative domain name:
“longmoangbao.com” *, quiet cheap, around 28SGD for 2 years.
then set up DNS record, point A record to public IP of EC2 instance.

then I can access my site from http://longmoangbao.com

But “http” is not a secured link, I need SSL, and though GoDaddy provides SSL, it is a bit expensive, for practice purposes, I don’t want to spend too much on it.
According to advice from ChatGPT, CloudFlare seems a reliable source, also I want more hands-on experience on CloudFlare as it’s been used in many companies I stayed.

So I go register CloudFlare account, use Free SSL, register my domain on CloudFlare, and follow its instruction to replace the nameserver in GoDaddy with Cloudflare’s nameserver

once you “update nameserver” in Godaddy, the DNS records setup be moved to the CloudFlare side, no longer on GoDaddy’s part.

Also setup A record and CNAME to CloudFlare proxy

then after one hour, the setup reflected.

Now we can access my project from

https://www.longmoangbao.com

update:

after update “nameserver” from GoDaddy, Cloudflare would carry exist DNS records to its DNS record, for me some A record should be removed, or it would trigger loop redirect(301), here is my final DNS records

“longmoangbao” comes from a stupid video a few decades ago, which means “no red envelope”

--

--

Ming-chiao Wu Jojo

Front-end developer, now self-learning to be a full-stack, love travel, live house, hiking, jogging, foodie, sleep until satisfied. ‘Hello World’