Dynamic DNS Updater: dynDNS.Namecheap
Short URL for this post: http://plp.me/j7kYVRI found out earlier this week that my favourite registrar, Namecheap, has a nifty little tool you can use to dynamically update the Namecheap-hosted domain A records. There's very little documentation available, despite the awesomeness and usefulness of such a tool, Namecheap doesn't really advertise it. The only piece of information related specifically to the dynamic DNS update manually is buried in Namecheap's knowledge base under "How to use the browser to dynamically update host's IP" and, after some Googling, a 5 years old non-exhaustive list of returned XML values on some obscure forum.
In order to ensure this works, however, there are a few dependencies:
- You need to have a domain registered with Namecheap;
- That domain needs to use Namecheap's nameservers (https://manage.www.namecheap.com/myaccount/modsingle.asp?domain=domain&type=backtous&rkey=NC);
- You must've enabled "Dynamic DNS" in your domain settings (https://manage.www.namecheap.com/myaccount/modsingle.asp?domain=domain&type=ddns&rkey=NC)
- This script is CLI-oriented, meaning it's meant to be executed via the command line. Regardless of your OS, you will need:
- php5-cli php5-curl;
- A working Internet connection;
That being said, it's relatively simple to understand. Most of the job is done server-side, so all you really need to do is hit a specific URL and let Namecheap do the rest:
https://dynamicdns.park-your-domain.com/update?host=&domain=&password=
Once you know that URL, it's pretty easy to implement something around it. Here's my little facilitator built in PHP:
