How I did my DNS
Domain Name Servers
By ahchao
July 19, 2021
How my DNS are done for a couple of my domains.
Dreamhost is a web hosting service I paid for, and they handle the DNS records as well.
I use DNS-O-Matic as a single point so my router only need to update the ip with them, and dnsomatic will update the rest of the services accordingly. So the (sub)domains of mine will have the updated ip address from my router.
For one of my domain, it is hosted on Dreamhost, including hosting and DNS. However DNS-O-Matic supports Namecheap, so I setup a A + Dynamic DNS Record
for my subdomain with Namecheap (it’s free here https://www.namecheap.com/domains/freedns/), which results in the subdomain (e.g. ip.ahchao.dev) A record pointing to my ip address that DNS-O-Matic is currently having.
At this stage, I just setup the subdomain ip.ahchao.dev’s nameserver to point to Namecheap’s FreeDNS, so that when Dreamhost (or whatever DNS provider I am using), will lookup the DNS provider (Dreamhost in the case) ip.ahchao.dev, notice ip.ahchao.dev nameserver is under FreeDNS, and the A record is my actual ip address.
I recently paid for the domains from PorkBun, and I wanted to host my DNS with them instead of Dreamhost, so I needed to change the authoritative nameservers from Dreamhost’s to PorkBun’s, and add DNS records in PorkBun settings so that email hosting still works and continues to be provided by Dreamhost. Luckily it was easy enough based on the records here https://help.dreamhost.com/hc/en-us/articles/215035818-Locating-your-DreamHost-email-DNS-records. I also had to move the records for any subdomains in Dreamhost over to PorkBun. So now PorkBun maintains DNS records, and Dreamhost is purely for hosting and email. I think this is better since there is separation of concerns and I can change out the hosting/email provider anytime, not to mention the hosting provider not holding hostage on your domain.