Home
Support Forums

How do I enable custom domains for my users?

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

For example, if I have a user with a profile at example.com/users/david or david.example.com how can I allow David to use exampledavid.com to access his profile page.

I don’t want the users to see example.com in the address bar, but instead for David to see exampledavid.com.

many sass products allow users to connect their domains to the app I am just wondering if there is any way to do this with Netlify API

Hi @Sahil,

You’d have to create a new website for each user and add a custom domain (exampledavid.com) to that website. Then they will have to configure the DNS just like any other website and you’d have to add proxy rewrites to point the domain to some other website.

So, exampledavid.com would have redirects like this: /* https://david.example.com/:splat 200!.

You can do this using API - first create a new website, add a new domain to it and deploy the _redirects file also using the API.