⚙️ Web EngineeringBy Neel VoraDecember 6, 20252 min read

How I Built My Multi Tenant Subdomain Architecture

Next.jsMiddlewareMultisiteContext ProvidersRouting

By Neel Vora

This post walks through how I built my Multi Tenant Subdomain Architecture, and where it fits in the rest of my work.

This approach builds on experience managing multi-site deployments for state agencies, where consistency across properties was essential.

My portfolio eventually became more than a portfolio. I needed separate spaces with their own branding, navigation, and behaviors. That meant building a multi tenant architecture.

Goals

  • ai.neelvora.com for experiments
  • shop.neelvora.com for digital products
  • blog.neelvora.com for writing
  • woodworking.neelvora.com, music.neelvora.com as creative spaces

Each section needed:

  • Different navigation
  • Different hero variants
  • Different context providers
  • Optional layout overrides

The approach

I use Next.js middleware to read the hostname and inject an x-site-key header. Every request carries site identity.

On the React side, a SiteProvider reads this header and loads config:

  • Nav items
  • Brand name
  • Hero layout
  • Which global components to hide or show

Why this works

No environment hacks. No rewrites. Just clean configuration per site.

Benefits

  • Easy to add new subdomains
  • Shared components stay shared
  • Site specific overrides are isolated

Takeaway

This system now powers all my public work and made the whole site feel modular and professional.

Keep exploring

From here you can:

  • See more details on the Colophon page.
  • Visit /neel-vora for more background about me and my work.
  • Browse more posts on the blog.

Thanks for reading! If you found this useful, check out my other posts or explore the live demos in my AI Lab.

More Posts