Do you own a domain registered with GoDaddy.com and want to host a server at home? You will soon realize that it’s not all that simple, due to a fact that your GoDaddy DNS zone record will not be in sync with the dynamic IP address assigned to you by your Internet provider. Let me show you a free way of addressing this very common issue.
One way of resolving the problem of keeping domain name in sync with dynamic IP address is to move domain name servers to a service such as DynDNS, TZO or No-IP, and then set up DNS records that will be updated by using one of their dynamic DNS clients. Unfortunately, all of these services are paid now, so let me outline a free option that will allow you to keep your domain name in sync with dynamic IP address.
Here comes DuckDNS.org:
There is a new player on the block called: DuckDns.org – free dynamic DNS hosted on Amazon VPC.
Just follow these 3 simple steps:
- Register a free account with DuckDNS. You’ll be assigned a free DuckDNS domain such as ServerAtHome.duckdns.org.
- Then install an update clients that will keep above duckdns domain in sync with your dynamic IP address. Note: I wrote two dynamic IP address update clients for DuckDNS myself:
- One is for Windows computers and I offer it as an open source free solution, you can download it from here: DuckDNS Windows client.
- Second one is for Android devices, you can download it from Google Play: DuckDNS Android client.
- If your server is being hosted on Linux or other type of servers or devices, there are many other options, just check their website to download the client you need for your requirements: http://www.duckdns.org/install.jsp
- Once your domain is setup and being updated with your dynamic IP address, all you need to do on GoDaddy is to point your domain name’s CNAME record to that of ServerAtHome.duckdns.org and you’re done. So let me illustrate this last step:
Let’s assume that your GoDaddy domain is called: ServerAtHome.com and DuckDNS domain that you’ve setup to update with Dynamic IP address is called: ServerAtHome.duckdns.org. All that needs to be done is to go to GoDaddy, navigate to settings of your ServerAtHome.com domain, and open DNS Zone File tab.
Change the settings, so they look just like this:
Once you save above settings, your domain www.ServerAtHome.com will always resolve to the most recent dynamic IP address of your home server. Meaning, it’ll be kept in sync by update client that is refreshing duckdns domain ServerAtHome.duckdns.org.
Note: This will only work with CNAME such as www.ServerAtHome.com or other sub-domains of your base TLD. This will not work for the root domain: ServerAtHome.com. Reason for this is that the DNS specification does not allow CNAME records on the zone apex (the base domain). This is because MX records would break as the CNAME would be followed to its target first. More about this here: http://blog.dnsimple.com/2014/01/why-alias-record/. Anyhow, as long as you’re ok with your domain being accessible over www.ServerAtHome.com and not through ServerAtHome.com directly, this solution will work for you just fine.
Update: If you want the root (base) domain being forwarded automatically to www.*, take a look at http://wwwizer.com. What they allow you to do is to point your root domain to 126.96.36.199 IP address and they will auto redirected the root domain traffic to the same domain with www in front. Which in our case will point to CNAME setup for a www. record, or in other words to a DuckDNS.org domain. In case of GoDaddy and our example above, all you need to do is to point A-record for ServerAtHome.com to 188.8.131.52 IP address. Note: this is a free service for all non-SSL traffic.
Easy, wasn’t it? :)