: 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
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
More posts by @Cugini213
2 Comments
Sorted by latest first Latest Oldest Best
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.
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.