We have 2 servers. During maintenance on our primary server 1, we want server 2 to serve a "temporarily offline" page. We're doing this by simply creating an account for the domain on both servers and adding both nameservers to the domain registrar like so:
NS1.SERVER1.COM
NS2.SERVER1.COM
NS1.SERVER2.COM
NS2.SERVER2.COM
This works great and when server 1 goes offline, server 2 immediately serves the maintenance page. The issue is that server 2 is then cached in the browser/ISP DNS cache and even after server 1 comes back up, visitors still see the maintenance page.
Is there some way to disable DNS caching on server 2 via PHP or Apache?