Dynamic DNS for Shared Hosting - Does it exist?

Solution 1:

You've already mentioned DynDNS, it sounds like all you're missing is the client. They mention a couple linux-compatible clients on their website.

  • ddclient
  • inadyn

Using either of these in combination with a dynamic DNS service should accomplish what you want.


I originally assumed that your shared hosting would provide you with shell access. Without shell access, things get a bit tricky. First, you need some way to run a script periodically. Some web apps implement "fake cron" by calling a routine on every page load, but that won't help when your site isn't accessible. That means you need access to the crontab.

If you have the ability to run a task periodically, you could develop a script that sends the new IP address to another host you control, which is also the authoritative DNS. The receiving host would use the new IP address to update the zone file, then reload the DNS configuration.

TL;DR No, I don't know of any service that already provides this.

Solution 2:

So far it has happened (to you) just once and that was for extraordinary reasons. Considering the drawback of dynamic DNS I really don't think it's worth the bother. If you still want to do it anyway just get one of the DDNS clients and run it on the server itself, as that's the only place it will work correctly.

If you are seriously concerned you should also implement some form of monitoring to ensure the server is reachable and have it alert you if it's not.

Solution 3:

periodically make a request to the Dreamhost API for the website's IP address. If the IP address on Dreamhost changes, the DNS host would automatically make the necessary changes to the [DNS] zone file

Nope, that doesn't exist.

What does exist, however, are 3rd party services which monitor your website by making HTTP requests, and change DNS when your webserver is down. However, these aren't 'automagically' integrated with your web host, and will not know if your web host has set up a new server for you. You will have to run 2 or more webservers yourself (using for example 2 different web hosts), and let the service fail over to a server designated by you.

Examples of such services are DNS Made Easy's DNS failover, and EdgeDirector together with their monitoring service. There are several others who offer something similar, typically at a higher price.

Please note, using DNS 'tricks' is not a perfect solution for high availability; because DNS records are cached by ISPs and web browsers. Thus a unknown number of your users will not be directed to the backup server right away, it will take some time.

You could also look at CloudFlare. They don't operate by 'dynamic DNS' as you asked about, but proxy your content through their network of nodes. However, they can to a degree provide service from cached content even if your server is down.