http-redirectdns

How should I temporarily redirect a website to a different domain?


We are powering down our data center for 12-18 hours during an infrastructure audit. We need to post a 'temporarily unavailable' message on websites affected by this outage.

In the past, I have changed the A-Record for the websites domain names to point to site hosted by a third party. The DNS changes appear to be instantaneous, but I worry about the potential 48 hour propagation lag.

Is there a better way to temporarily redirect a site during an outage?


Solution

  • I ended up using a reverse proxy. We use CloudFlare for DNS. I recently upgraded our service to their Business license. This allowed me to create a simple HTML page response for specific HTTP errors (>500 for example), which handles site outages nicely. I was even able to embed images using base64 encoding so it wouldn't be dependent on an image host.

    https://www.cloudflare.com/learning/cdn/glossary/reverse-proxy/