Mobile app version of vmapp.org
Login or Join
Megan663

: Monitor a website and change it to show an error message when the web server is offline I own a domain. Let's name it example.com. I have my own server. For this example, its IP is 1.1.1.1.

@Megan663

Posted in: #Dns #Php #Redirects

I own a domain. Let's name it example.com.

I have my own server. For this example, its IP is 1.1.1.1.

I use Amazon Route 53 and have configured my DNS. Each time a visitor visits example.com, she transparently connects to 1.1.1.1. Then, when she visits 1.1.1.1/test/, the displayed URL is example.com/test/

Perfect.

However, sometimes my server is not online. This is not a huge problem because this is a personal website. I would like to display a message like this though: The server is down, please check back later.

I have now a small hosting plan (~ 99% uptime) where I want to host a single php page that will probe the server 1.1.1.1 when the visitor visits example.com. If the server is nonreachable, it displays the error message. If the server is reachable, I would like to transparently redirect the visitor to the index page of example.com instead of displaying 1.1.1.1 as URL. I do not want to use any frame.

My question is: it is possible to configure the DNS for this purpose?

Second question: if so, how could it affect the SEO? For instance, when GoogleBot connects to example.com, I would like it to see the index page from the server as the main page instead of the probe page.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Megan663

2 Comments

Sorted by latest first Latest Oldest Best

 

@Rivera981

Well, although you should move to a more reliable server, I would answer your question.

Use Route 53 health checkup for monitoring the site. Also, setup active-passive dns failover policy within route 53 to change your DNS on your server downtime. Read about dns failover policy here. Remember to keep TTL very low (ideally 60 sec) so the change happens within 1 min of the failover.

However, what benefit are you going to draw by showing the user that the site is down? If you want very high availability, you can use this policy and replicate the site on both the servers to achieve almost 100% availability. Again, there are better solutions for that kind of replication in amazon aws but it is kinda okay for a personal website.

10% popularity Vote Up Vote Down


 

@Heady270

Google does not include sites in its index that are not available 24 hours a day. If your website is going to be offline for a good portion of the day, search engines are not going to index it.

It might be possible for your hosting plan to put up that error message. To do so, it would need to change the DNS entry to point your website to a different server that is up.

That seems needlessly complicated to me. It usually makes more sense to put your website on a host with better uptime. Since you have a hosting plan, I suggest that you use it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme