Mobile app version of vmapp.org
Login or Join
Cugini213

: How to dynamically change the host URL? 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

@Cugini213

Posted in: #LoadBalance #Nameserver #Server #WebHosting

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:


create a copy of b.com, in a subfolder of a.com, like a.com/bdotcom
If b.com is unreachable, redirect it to a.com/bdotcom
If possible, keep the url as b.com

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cugini213

2 Comments

Sorted by latest first Latest Oldest Best

 

@Jessie594

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.

10% popularity Vote Up Vote Down


 

@Sue5673885

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme