How to Design Tenant-Specific Subdomains in Your SaaS Application

Arpit Jain
Geek Culture
Published in
5 min readMar 29, 2021

--

I recently worked on a feature for configuring tenant-specific custom subdomains in our product. In this article, I am sharing some of the designs our team iterated on, and their pros and cons.

What are tenant-specific subdomains?

Tenant-Specific Subdomains (a.k.a. custom subdomains) are a common feature provided in a multi-tenant SAAS solution, allowing each tenant to configure a subdomain of their choice.

Say you are a cloud SAAS solution and all your customers use your product at https://www.awesomesite.com. With custom subdomains, Customer A can use the product at say https://customerA.awesomesite.com, and similarly, Customer B can use the product at https://customerB.awesomesite.com.

Why might one need Custom Subdomains?

The most common use case of subdomains is to create custom welcome/login pages for your tenants. It is a common requirement, particularly if your customers are using SSO-based login and want only their relevant identity providers to be displayed on your product’s login page as shown below.

Custom login pages for various tenants of awesomesite.com product

Other than this, here are some more benefits of using custom subdomains.

  1. Subdomains can provide your tenants better isolation…

--

--

Arpit Jain
Geek Culture

Scalability & Big Data Enthusiast | Microsoft | Sumo Logic | UW Madison | Myntra | IIT Guwahati