Can I set up websites on multiple hosts using the same domain name? [closed]

柔情痞子 提交于 2019-12-02 05:16:09

Yes this is easily accomplished via the dns settings for your domain.

You need to know the IPAddress or domain name for the different hosts. You can then setup a CNAME record for the subdomain and point it to the coresponding target host

i.e.

*.mysite.com -> A Record -> host A

retailers.mysite.com -> CNAME -> host B

This is absolutely feasible. Subdomains (such as retailers.mysite.com) can resolve to a different IP address than the main site. In fact, I've used this feature before to make a subdomain of my website redirect to my PC's current IP address.

Whether this feature is available may, however, may depend on who the domain name's registrar is and what configuration options they provide. Some registrars may charge extra if you have more than a particular number of sub-domains, others allow unlimited numbers.

Another (alebeit inferior and slower) way to accomplish the same goal would be to use Mod Rewrite to rewrite urls so they go to the other server.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!