A very failsafe and simple setup would be to have two servers in different geographical locations, each running web-server software, DNS-server software, and Simple Failover.
Simple Failover on each server would be configured to monitor both web-servers, and to update both DNS-servers.
If one of the servers fails, Simple Failover on the other will update DNS to point the domain name to itself only: