Sitemap

Member-only story

Step by step: Multi-Tenant App with Next.js

6 min readApr 3, 2023
Press enter or click to view image in full size

Next.js now allows you to easily create a multi-tenant application using subdomains. This enables you to create web apps like Linktree, Super.so, and other apps where a user gets their own webpage for example.

Before we start, here are some additional resources:

Step 1: Create a blank Next.js app

npx create-next-app

You will be asked if you want Typescript, ESLint and other options. Hit yes for everything.

Once the app is created, open it in your code editor (VSCode).

Step 2: Deploy app to Vercel

You can do inside VSCode by opening the terminal (Command + J on Mac).

Install the Vercel CLI:
npm i -g vercel

Once that is done, go ahead and run:
vercel --prod to deploy it to production

Click on the deployment link to end up in the Vercel dashboard.

Step 3: Setup your domain

--

--

Iskandar Kurbanov
Iskandar Kurbanov

Written by Iskandar Kurbanov

Software Developer | Programming Instructor and Shopify Consultant