What is Dynamic DNS and why do I need it?
DNS (Domain Name Server) is how the internet maps human style domain names (like google.com) to ip addresses. In the world of internet there are two types of IP address, static and dynamic. Static IP addresses don’t change, so it’s relatively easy to map domain names to the correct IP addresses. Dynamic IP addresses, on the other hand change from time to time. Most cable modem and DSL services provide dynamic IPs. That means that if you want host a file server on your home computer, or be able to access your files from work (or while on vacation), you’ll need some way to keep your IP address up to date in case your provider changes it.
This is the purpose (or one purpose) of Dynamic DNS providers such as dyndns.org or no-ip.com. You sign up for an account, choose a host/domain that you think you’ll remember, and then run a program on your computer or router that tells the service your current IP address. That way, no matter where you are me.ddns.net (or whatever you chose) will always point to your computer.
The problem is that DynDNS discontinued their free service and I could never seem to remember my No-IP hostname. Moreover, for a free account, in No-IP, you have to log in every month and tell them not to discontinue your service. Not too cumbersome, but still, can’t they just check user logs and only require that of dormant accounts?
So where do I get Dynamic DNS for free?
I thought there had to be a better way, enter Namecheap.com. In my Upgrade from Shared Hosting series, I suggested some benefits of separating your domain name registrar from your webhosting. I also suggested that you could even separate your DNS hosting from your Domain Name registrar. Namecheap.com happens to offer fairly competitive domain registration. They also offer free DNS hosting, so no matter, who you use as your domain registrar (even if it’s your webhost), you can still use Namecheap.com as your DNS host.
I did not know it until recently, but one of the features that Namecheap.com offers as part of their free DNS hosting is free Dynamic DNS. It is insanely easy to set up, and the best part is that the routers that I use have Namecheap.com already configured as a Dynamic DNS provider (meaning that you don’t have to run a program on your computer).
Describe this “easy” process
This only works if you’re using Namecheap as your DNS server. For this article, I’m assuming you already have it or have followed my directions here.
- Log in to Namecheap and choose “Your Domains/Products”. Then scroll down to “Free DNS” and choose Hosted Domains.
- Click on the domain name you want to use for Dynamic DNS.
- Choose a “host” for your dynamic DNS. So, if you want me.mydomain.com to go to your home computer, create an A record for “me” with a short TTL (time to live) and give it the ip address 127.0.0.1. (it doesn’t really matter, because it will be overwritten by your update client). Choose save changes.
- On the left hand side, under Advanced Options, choose Dynamic DNS.
- Choose enable, and then look at the directions. If you’re following me, you can ignore everything except the password. Copy down the password, and open a new browser window.
- Enter the Following URL into the Browser: https://dynamicdns.park-your-domain.com/update?host=[host_name]&domain=[domain.com]&password=[domain_password]/li>
- The [host_name] is the host you created the A record for above. The [domain.com] is your domain name. The [domain_password] is the ppassword you copied a second ago. So using my example above, the address would read https://dynamicdns.park-your-domain.com/update?host=me&domain=mydomain.com]&password=efg3234ksdfj234jfsdlk3/
- Hit enter and you’re done. Visiting that web address copies your current IP address into the A record you created in the first step. Now me.mydomain.com will point to the computer you used to enter the address above.
- You can read the official help files from Namecheap.com here.
Maintaining your Dynamic DNS
You need to have some way of updating your IP address. You could just bookmark the web address above and visit it once a day or once a week, but that’s not very automated or cool. You could set up a cron job to wget the address once a day (if you’re using Linux or Mac). Or you could install a DNS updater. But the easiest way is to configure your browser to do it for you.
The official Namecheap.com Dynamic DNS help files have directions for setting up a DD-WRT router. On my Asus router, after logging in, I went to WAN under Advanced settings (left hand side) and then chose DDNS from the options across the top of the page. Choose Namecheap from the server dropdown, and enter your information (host, domain name, password), hit save, and you’re done.
Free, simple, no brains Dynamic DNS. And the best part is you get to your own domain name instead of whatever leftovers DynDNS or No-IP happen to have available. Even if you don’t have a domain name, buying a domain from Namecheap (or other registrar) will cost you less than DynDNS’ least expensive option.