Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have two websites, say a.com and b.com.

a.com is on a paid hosting service, and b.com is on 000Webhost.

000Webhost crashes sometimes, and my site b.com becomes unreachable.

So is there any way that I can:

  1. create a copy of b.com, in a subfolder of a.com, like a.com/bdotcom
  2. If b.com is unreachable, redirect it to a.com/bdotcom
  3. If possible, keep the url as b.com
share|improve this question

marked as duplicate by Stephen Ostermiller Sep 6 '13 at 14:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This question requires DNS management, as answered below, which is a bit different than the linked duplicate question. – dan Sep 16 '13 at 12:03

You would need to have a program checking the status of b.com and once it was unreachable use an API to set a CNAME record for b.com pointed to a.com/bodtcom, though you would need to use b.a.com and have it as a sub-domain.

However a host that is unreachable for me, may still be reached by others. It all depends on what the problem is and where.

In my opinion, I would leave 000Webhost, and move that domain to a more reliable hosting company.

If you have enough money the best solution is to use a load balancer and Scalr on AWS or another cloud service that can monitor your two domains and servers and if a problem comes up it would automatically re-direct traffic.

share|improve this answer

I think it would require DNS switching.

Check with the domain hosting provider if they can switch it to your backup site as fallback requirement.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.