Next.js Discord

Discord Forum

how to implement this

Unanswered
Bonga shad posted this in #help-forum
Open in Discord
Bonga shadOP
Guys im creating a site which takes a resume and creates a portfolio component with dara exracted from the resume. I am wondering how to deploy it so the user can have a live link

3 Replies

Sun bear
You can use either a dynamic route in next.js or a wildcard subdomain.

1. dynamic route example.com/[name] -> example.com/john-doe to access the website
2. wildcard domain *.example.com -> john-doe.example.com users access the website using subdomain. Both Vercel and Cloudflare offer great wildcard domain support for which the trickiest part is getting the SSL for.

Then you can extract the host header in middleware and rewrite the request internally to a dynamic path under the hood to include the tenant.

For simplicity I would just go with the dynamic route until you get real users using your app.