A single Next.js app serving thousands of doc sites

Fern builds and hosts API documentation for companies like Webflow and ElevenLabs. Instead of spinning up a separate deployment for each customer, the platform runs one Next.js application on Vercel and uses Vercel Middleware to route traffic dynamically across customer domains. That multi-tenant setup keeps infrastructure simple while serving 6 million+ page views from 1 million+ unique visitors each month.

The team splits its environment into a main multi-tenant stack at prod.ferndocs.com, a performance-tuned variant at app.ferndocs.com focused on CDN delivery, and a development environment at dev.ferndocs.com. Vercel's custom domain support lets customers bring their own URLs — either subdomains like docs.website.com or subpaths like website.com/docs — via a simple CNAME record.

Example of developer documentation built with Fern and hosted on Vercel.

Fern's architecture routes all customer traffic through this single application, which keeps deployment and maintenance overhead low.

The architecture behind prod.ferndocs.com

Cutting the deployment feedback loop

Fern previously ran backend services on AWS Fargate, including a critical indexing script that handled database reads and writes and populated Algolia. Deploys went through AWS CDK, producing a 30-minute lag from merge to live update. That made iteration expensive.

Moving this workload incrementally to Vercel Functions compressed deploy times to five minutes. The team now ships multiple times per day, tests changes in preview environments first, and uses Vercel's Manual Promote and Instant Rollbacks to control production releases. Monorepo support in Vercel also lets Fern deploy updates across all customer sites at once from its open-source repo.

Speed as a product feature

Documentation load times matter to Fern's enterprise customers. Vercel's global CDN reduces latency, while automatic caching and Incremental Static Regeneration (ISR) keep doc content current without triggering full site rebuilds. Native video hosting removes the need for third-party players, which speeds up integrated playback in onboarding content.

Fern also migrated 65% of its platform from Pages Router to Next.js App Router in seven days. The switch delivered:

  • 50-80% faster load times for documentation pages
  • 3x faster time to first byte — from 1.63s to 0.55s at p95
  • React Suspense and loading.tsx for smoother route transitions

To validate the improvements, Fern stress-tested the platform with 6,000 simultaneous GET requests, confirming stable response times across all customer sites. The company reports an 83% reduction in deploy times overall and is scaling at 63% month-over-month growth.

"Every single day customers ask for more features. Vercel lets us focus on shipping user-facing functionality, abstracting away the infrastructure that would otherwise slow us down."

Danny Sheridan, co-founder and CEO

The result is a documentation platform that handles multi-tenancy, rapid iteration, and global performance without the operational burden of traditional infrastructure.