When you say "if something happens to my domain name", do you mean losing the domain, or a server going down temporarily, or IP address renumbering, or what?
There are a few "solutions":
- Use a "dynamic DNS" service to point to your server. Try those if your DNS goes down.
- Use some free hosting sites (Google Pages, Google App Engine, etc) to redirect to your server. Try those if your server goes down.
Then, when the app fails to connect to the "normal" server, it can try the fallback servers. When you notice that something's gone wrong, you can reconfigure the other sites to point at a working server.
These only really help if you actually lose your domain (e.g. it expires and someone else buys it — don't let that happen in the first place!). You need to be able to bring up a second server at short notice in any case, and zones are supposed to have secondary nameservers in case the primary goes down.