Wildcard user subdomain / sites

This question has been asked a lot, and I still haven’t figured it out. :slight_smile:

My app has the same requirements as Carrd.co.

Users create a site to share, and they create a subdomain as the link.

User creates “Cool Site”, and give it subdomain: cool-site.myawesome.app

Currently, I have a domain in Netlify bought through Netlify. Which I think supports wildcard subdomains.

I would like to know how to do this, and then how to do redirects based on this. :slight_smile:

I tried:

redirect:

from = “https://*.myawesome.app”
to = “https://myawesome.app/user-site/:splat
status = 200

The app is a SPA app, and user sites will be rendered from a path called user-site.

So ideally the redirect can mask that path, and it looks like its just cool-site.myawesome.app but its actually running: myawesome.app/user-site/cool-site

How do I do this?

Thank you!!

If you are on the pro plan or above a Netlify Engineer can enable wildcard subdomain for you, if that’s what you’d like and you’re a paying netlify user then I’d recommend confirming that here, then when Netlify staff are able to view this they can act quickly :slight_smile:

1 Like

Thanks, Aaron!

Yes, I am on the pro plan. I have to get netlify to enable it?

Just as an FYI for others, Vercel has a quick demo of this type of thing:

I wanna do that, but with Netlify. :slight_smile:

Yeah they’ll sort this out for you, it might take til monday as I’m not sure if they work weekend! Ill tag @perry just so it doesnt get lost til then. :slight_smile:

1 Like

Heya @nodoio - super sorry to miss this! We can absolutely configure that for you - please feel free to email support@netlify.com for faster attention in the future.

What site ID is it you’d like configured for wildcard domains? There are some prerequisites so I’ll check out your config and let you know what if anything is missing and we can go from there (sooner than a week from now!)