TL;DR: White-labeling lets resellers rebrand and sell your SaaS as their own. This requires custom domain support, tenant-specific theming, and a reseller pricing model. This guide covers the architecture for custom domains, dynamic theming with CSS variables, and reseller pricing tiers.
Introduction
White-labeling is a powerful distribution channel for SaaS products. Resellers market your product under their brand, expanding your reach into markets you couldn't access directly. The technical challenge is supporting custom domains, branding, and pricing for each reseller.
Custom Domain Support
White-labeling begins with routing each reseller's custom domain to the correct tenant configuration. A properly designed multi-tenant architecture is essential for isolating data and configurations across resellers:
export const domainMiddleware = defineMiddleware({
before: async ({ request }) => {
const host = request.headers.get('host')
const tenant = await db
.selectFrom('tenants')
.where('custom_domain', '=', host)
.orWhere('subdomain', '=', host.split('.')[0])
.executeTakeFirst()
return {
tenantId: tenant.id,
branding: tenant.branding_config,
}
},
})
Dynamic Theming
function WhiteLabelProvider({ children, branding }) {
useEffect(() => {
const root = document.documentElement
root.style.setProperty('--color-primary', branding.primaryColor)
root.style.setProperty('--color-logo', branding.logoUrl)
document.title = branding.siteName
setFavicon(branding.faviconUrl)
}, [branding])
return <ThemeProvider theme={branding.theme}>{children}</ThemeProvider>
}
Reseller Pricing Model
| Model | Description | Best For |
|---|---|---|
| Wholesale discount | 30-50% off list price | Single product resellers |
| Per-seat markup | You set base, reseller adds margin | Enterprise resellers |
| Platform fee | Fixed monthly + usage | Agency partners |
| Revenue share | 70/30 split | Marketplace model |
Conclusion
White-labeling creates a reseller channel that can multiply your distribution. The technical investment — custom domains, dynamic theming, reseller management — is straightforward with middleware-driven architecture. For structuring reseller pricing, see SaaS pricing tier strategy.