Custom domains for users, with Netlify

I’m working on a platform that involves publishing called deeplink.space

I want users to be able to set either a custom domain, or a subdomain on deeplink.space

I thought about setting a script to create DNS entries, but that felt inelegant. I’m sure this is a common problem with a simple solution.

Thanks for your help!

Howdy Oysterperson!

Can you tell us more about how users would interact with the system? I can tell you how to do a lot of things, since this presumably all lives in your Netlify account (does it?), so you can make API calls or whatever. Could you walk us through in detail how you plan to set things up, so we can give you the best advice?

Sure!

a) Usernames as a subdomain. Ex: arnav.deeplink.space shows the same content as deeplink.space/arnav

b) A user can configure their personal domain to open their page at. Ex: arnavbansal.dev opens deeplink.space/arnav

And they’re running the same deployed frontend.

so my followup questions can be summarized as “more details please”, but specifically:

  1. If they write it down for you and you’d have to apply it manually anyway, you can use our API to apply it (they can’t - they don’t have permissions): [Common Issue] Understanding and using Netlify's API
  2. you don’t apply any hostnames to it at all; we have a feature to resolve *.yourdomain.com to a single site without configuring more than a single name on there (available on the Pro plan only)
  3. other options may be possible but I’ll wait for your response before dreaming them up :slight_smile:

Oh, awesome!

Both the API and the wildcard subdomains sound pretty awesome! I’ll have to wait a while to get the pro plan, but I’ll go for it.

I’ll be gathering user’s preferred hostname as a config option, and will trigger the Netlify API to add their subdomain or domain.

Thanks a lot for your response! Would love to hear if you have any other options.