Use your sub-domain for a home server without having a static IP address

A while ago I was setting up a Ventrilo server for a few friends and I to use when playing online games. My Internet provider doesn’t give a static IP address, so I’d need to use a DDNS service to give the server address to my friends, the problem was I find those host names a little ugly.

After a little googling, I found a way to use my own domain ( to resolve to my home IP address through CNAME records.

Firstly, you need to set up a Dynamic DNS provider, ideally one that’s compatible with your router to aid updating it. If you’re running Tomato like me, works pretty well. Once you’ve got this set up, you’ll get a host name which will resolve to your IP address; lets say it’s “”.

Secondly, decide what host name you want as the “pretty sub-domain” ( for example) and set up a CNAME record on your domain to create an alias. Depending on who’s providing your domain name, you might have access to do this yourself or need to submit a support ticket. It will look a little like this (yes, the trailing . is needed).        CNAME

When a DNS request is made to “”, it will alias to “” then restart the DNS request at “”.

Finally, if you have problems in connecting to “” from your internal network when “” resolves to an another IP address on your internal network, you’ve hit the “NAT Loopback” problem I had. To resolve it, enable “NAT Loopback” on your router, and/or, if you have access to Dnsmasq (like on Tomato firmware), add the following entry.


Doing this will basically ensure machines on your internal network can connect to other machines inside your network by an external IP address.

If you now ping and; they will resolve to the same IP address and you can use from both machine outside and inside your firewall.

Leave a Reply

Your email address will not be published. Required fields are marked *