How do I enable custom domains for my users?

后端 未结 3 942
悲&欢浪女
悲&欢浪女 2021-02-19 19:00

I am looking to allow my users to use their own domain name to access my web service.

For example if I have a user with a profile at example.com/users/david how can I a

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-19 19:25

    You can easily enable this by telling your clients to configure a CNAME to point to your domain.

    So if your server is located at www.example.com you tell 'david' to configure www.exampledavid.com to have a CNAME record pointing to www.example.com

    At the server end you would have a configuration that detected the domain that was being requested and redirected and served the appropriate content to 'david'

    If your clients want to use the naked domain i.e. exampledavid.com to your servers, you would need to provide them with an IP address, however before doing this you would need to be sure that your IP address wasn't going to change, and probably have a contract with whoever supplies it to ensure that.

提交回复
热议问题