---
title: Multi-tenant platforms
description: Build a platform that serves many customers. Choose between one shared app and a project per customer, route and isolate tenants, onboard custom domains, provision customer deployments, and operate at scale.
url: "https://vercel.com/kb/architecture/multi-tenant-platforms"
last_updated: 2026-11-02
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Multi-tenant platforms

Build a platform that serves many customers. Choose between one shared app and a project per customer, route and isolate tenants, onboard custom domains, provision customer deployments, and operate at scale.

## Choose your platform model

Decide whether every customer shares one app or gets their own project, then start from a working reference.

### Shared app or a project per customer?

Use one codebase when customers differ only in content and branding; use separate projects when they need their own code or deployment lifecycle.

- [Vercel for Platforms](https://vercel.com/docs/platforms): Compare the multi-tenant and multi-project architectures by isolation, complexity, and the platforms each suits.
- [How Mintlify scaled to thousands of custom domains](https://vercel.com/customers/mintlify-scaling-a-powerful-documentation-platform-with-vercel): See why Mintlify replaced a cloned app per customer with one multi-tenant project serving about 2,500 custom domains.
- [How General Intelligence used agents to build an agent platform on Vercel](https://vercel.com/customers/how-general-intelligence-used-agents-to-build-an-agent-platform-on-vercel): See the opposite model: every company gets its own repository, managed deployment, and domain, all provisioned automatically.

### Start from a reference implementation

Clone a working multi-tenant app instead of building tenant routing and accounts from scratch.

- [Platforms Starter Kit](https://vercel.com/templates/next.js/platforms-starter-kit): Deploy a Next.js 16 app that routes tenant subdomains in \`proxy.ts\`, stores tenants in Redis, and supports local subdomains and previews.
- [Clerk Authentication Starter](https://vercel.com/templates/next.js/clerk-authentication-starter): Add sign-in and Organizations-based multi-tenancy to a Next.js 16 app, protected by \`proxy.ts\`.

## Route and isolate tenants

Resolve every request to a tenant, then enforce that tenant's boundaries wherever data is read or changed.

### Resolve the tenant on every request

Map the incoming hostname to a tenant in the proxy without letting user input choose where traffic goes.

- [Proxy Basics](https://vercel.com/academy/nextjs-foundations/proxy-basics): Build a Next.js 16 \`proxy.ts\` that intercepts requests, sets headers, and skips static assets, the layer where tenant resolution runs.
- [Enhancing Security for Redirects and Rewrites](/kb/guide/enhancing-security-for-redirects-and-rewrites): Learn how security measures in URI handling can prevent semantic attacks, where malicious hosts exploit redirects and rewrites to mimic trusted sites, leading to phishing and data breaches.
- [How Waldium made a blog platform work for humans and AI alike](https://vercel.com/customers/how-waldium-made-a-blog-platform-work-for-humans-and-ai-alike): See how Waldium routes every customer blog, MCP endpoint, and custom domain to the right tenant from one Next.js app.
- [How Fern delivers 6M+ monthly views and 80% faster docs with Vercel](https://vercel.com/customers/how-fern-delivers-6m-monthly-views-and-80-faster-docs-with-vercel): See how Fern serves docs for Webflow and ElevenLabs from one Next.js app, routing each customer domain to the right tenant in Middleware.

### Enforce tenant boundaries on data

Routing tells you which tenant a request is for; session, membership, and data-layer checks still protect every read and write.

- [Multi-Tenant Platform Concepts](https://vercel.com/docs/platforms/multi-tenant-platforms/concepts): Identify tenants in \`proxy.ts\`, pass tenant context safely, and keep each tenant's data isolated.

## Connect customer domains

Give every tenant a platform subdomain, then let customers bring their own domain with verification and automatic SSL.

### Give every tenant a subdomain

Set up a wildcard domain once, and stop tenants on a shared domain from reading or setting each other's cookies.

- [Multi-Tenant Platform Concepts](https://vercel.com/docs/platforms/multi-tenant-platforms/custom-subpaths): Understand how tenants, domains, SSL certificates, and Proxy routing fit together in a multi-tenant app on Vercel.
- [Managing DNS Records](https://vercel.com/docs/domains/managing-dns-records): Add, verify, and remove DNS records for your platform and tenant domains on Vercel, including subdomains that point to external services.

### Let customers bring their own domain

Add customer domains programmatically, verify ownership, and show customers the DNS records they need.

- [How Dub grew to 3,000 active domains with Vercel](https://vercel.com/customers/how-dub-grew-to-3000-active-domains-with-vercels-multi-tenant-saas-toolkit): See how Dub provisions customer domains through the Domains API and lets Vercel handle SSL.
- [Configuring Custom Domains](https://vercel.com/docs/platforms/multi-tenant-platforms/configuring-domains): Add, verify, redirect, and remove tenant domains with the Vercel SDK, and submit your shared domain to the Public Suffix List.
- [Vercel Settings](https://vercel.com/academy/vercel-foundations/vercel-settings): Add a custom domain to a project, then set environment variables, team roles, and access groups.

## Provision and operate

Create customer projects from your own application, keep each tenant's content fresh, and stop one tenant from exhausting shared capacity.

### Create and deploy projects programmatically

Turn "new customer" or "new app" into a project, a deployment, and a public URL through the Vercel SDK.

- [How Klaviyo shipped 356 internal apps in two weeks on Vercel](https://vercel.com/customers/how-klaviyo-shipped-356-internal-apps-in-two-weeks-on-vercel): See how a Vercel SDK pipeline creates a repository and deployment per app and applies SSO, secrets, and security defaults.
- [How Factory scaled its backend to a billion monthly requests](https://vercel.com/customers/how-factory-scaled-its-cloud-backend-to-one-billion-monthly-requests-on-vercel): See how Factory's Droids build internal tools and deploy them through Vercel's API, with engineers setting guardrails and reviewing high-stakes changes.
- [Multi-Project Platforms Quickstart](https://vercel.com/docs/platforms/multi-project-platforms/quickstart): Write a script that creates a project, deploys a folder of files, waits for the production URL, and adds a custom domain.

### Build an AI app builder

Let users generate apps from prompts, preview them live, and deploy the result.

- [Introducing the new v0 API](https://vercel.com/blog/introducing-the-new-v0-api): Embed v0's app-building agent with isolated chats, streamed progress, sandboxed previews, and calls that deploy to a Vercel project.
- [Build a v0-style app builder with OpenAI Agents API and Vercel Sandbox](/kb/guide/v0-clone-openai-agents-vercel-sandbox): Build a chat-to-app workspace with live Next.js previews, follow-up edits, and saved projects using the OpenAI Agents API preview, Vercel Sandbox, and Queues.

### Cache and revalidate per tenant

Tag cached data by tenant or content unit so one customer's update invalidates only their pages.

- [How GitBook serves 30,000 sites with sub-second content updates](https://vercel.com/customers/how-gitbook-serves-30000-sites-with-sub-second-content-updates): See how GitBook serves 30,000 docs sites from one deployment with \`use cache\` and 40,000 targeted invalidations a day.
- [How to move from time-based to on-demand revalidation](/kb/guide/how-to-move-to-on-demand-revalidation): Replace fixed revalidation timers with scoped updates triggered by changes to content, product data, or other application data.

### Protect shared capacity from noisy tenants

Rate-limit at the edge and in code by tenant or organization, and track each tenant's usage, so one customer can't degrade the others.

- [How Durable serves 3 million customers with 6 engineers](https://vercel.com/customers/360-billion-tokens-3-million-customers-6-engineers): See how Durable runs millions of customer sites and agents on one platform, where one tenant can draw 100x the traffic of another.
- [Unified reporting for AI Gateway usage by customer and feature](https://vercel.com/blog/unified-reporting-for-your-ai-spend): Tag AI requests with customer IDs to track usage and cost per tenant, feature, and pricing tier, and see which customers drive your spend.
- [Add rate limiting with Vercel](/kb/guide/add-rate-limiting-vercel): Learn how to implement rate limiting with Vercel.
- [Firewall Rules](https://vercel.com/academy/optimize-your-vercel-account/firewall-rules): Publish a custom Firewall rule that rate-limits an endpoint, then test the 429s and recovery.

## Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

- [Agent stack](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)
