So, I’ve got this great domain setup, but it seemed to be lacking one thing. I wanted to give my personal server a URL within the Jessebowes.com domain. After a lot of playing around, I found it to be really easy to do.
Here’s how to set it up so that you can access your personal server through subdomain.domain.com
Step 1. Set up a dynamic DNS hostname. For this, I used the Free Dynamic DNS service from DynDNS.com. From now on, let’s refer to this a dynamic.dyndns.org, where dynamic is the hostname you chose. You need to make sure you can get to your locally hosted website by going to http://dynamic.dyndns.org
Step 2. Set up a CNAME DNS entry on your hosted web account. This varies per provider but for me, it’s really easy through Dreamhost’s web panel. Set up in the following format:
Step 3. You’ll want your new subdomain to resolve correctly every time your IP address changes, so look into eitherhttps://www.dyndns.com/support/clients/ or 3rd party router firmware such as Tomato or DD-WRT, so your DynDNS address is always pointing at your current IP.
That’s it! Now, http://subdomain.domain.com should load the same page as http://dynamic.dyndns.org.
NOTE: It typically takes a while for DNS entries to propogate across the internet. Please allow several hours for subdomain.domain.com to become active.