We have our corporate public website hosted on an internal server. We want to use Amazon Route 53, and the Health Checks feature to monitor this website, and automatically redirect visitors to an "under maintenance" page (hosted in an S3 bucket) in the event that the primary site goes down.
I have everything working like this:
- Route53 PRIMARY record: mydomain.com --> [IP Address of internal Web Server]
- Route53 SECONDARY record: mydomain.com --> [ALIAS for S3 bucket mydomain.com] --> S3 Web Redirect for all requests --> maintenance.mydomain.com (S3 bucket)
This all works great. If the primary goes down, visitors are redirected to maintenance.mydomain.com.
However, the problem is that browsers seem to be caching the redirect and maintenance page, so even once Route53 has switched back to the PRIMARY record, if the visitor tries to go back mydomain.com, they go straight back to the maintenance.mydomain.com page. Even closing and opening the browser doesn't help. Only manually clearing the browser cache, or switching to a different browser seems to help.
Any idea on how I could change anything to get the 'failback' working better?