Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

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