Learn how jpfproducts.in routes traffic dynamically based strictly on the request Host header—serving completely isolated tenant storefronts from a single Next.js codebase.
Each subdomain loads isolated mock data, custom branding, distinct color themes, and tenant-specific products.
Cutting-edge audio devices, high-refresh displays, and ergonomic workstation gear built for tech enthusiasts.
Handcrafted Italian leather accessories, mulberry silk garments, and timeless designer silhouettes.
Authorized store for high-tier smartphones, wireless audio, MagSafe charging, and gaming accessories.
Sustainably sourced hardwood furniture, ergonomic office setups, and architectural lighting solutions.
Visiting an unregistered subdomain (e.g., unknown.jpfproducts.in or unknown.localhost:3000) cleanly triggers the custom Tenant Not Found page.
No query parameters (?tenant=raghu). No URL paths (/raghu). Clean hostname detection only.
raghu.jpfproducts.in
*.jpfproducts.in → Server IP
Extract Host header: "raghu"
NextResponse.rewrite(/tenant/raghu)
URL stays raghu.jpfproducts.in
Modern web browsers (Chrome, Firefox, Edge, Brave, Safari) natively resolve any subdomain ending with .localhost directly to 127.0.0.1. You do not need to edit system hosts files or install local proxy tools!
npm run devhttp://raghu.localhost:3000 in your browserraghu as the tenant keyHow to configure domain provider records for *.jpfproducts.in on Vercel, Cloudflare, or custom servers.
Adding *.jpfproducts.in causes all subdomains (raghu, nadella, etc.) to resolve to your server IP automatically without creating individual DNS entries.
*.jpfproducts.inPlatforms like Vercel automatically issue a single Wildcard Let's Encrypt SSL certificate covering both jpfproducts.in and *.jpfproducts.in.