Skip to content
← Insights

Custom Domain or Shared Subdomain for a SaaS: How to Choose an Address for Each Customer

Compare managed subdomains and custom domains for a B2B SaaS, with practical criteria covering branding, DNS, certificates, tenant isolation, support, and future growth.

Comparison of a managed subdomain and a custom domain for customer workspaces in a SaaS product

Each customer’s web address may seem like a branding decision, but in a multi-tenant SaaS it also affects onboarding, security, support, and day-to-day operations. Offering a product-managed subdomain, allowing a customer-owned domain, or supporting both options involves different costs and responsibilities.

There is no universally better choice. It depends on how much control the provider wants to retain, what experience customers expect, and whether the team can reliably operate domain verification and certificates. This guide offers practical criteria for deciding, along with a path for evolving the setup without committing in advance to a single architecture.

What each option means

What each option means

With a shared subdomain, the provider controls the base domain and assigns an address to each organization, such as company.product.example. The customer gets a recognizable URL, while the SaaS manages the DNS infrastructure and root domain. Each organization’s name must be linked to an internal record, not treated as proof of identity or authorization.

With a custom domain, the customer asks to point an address they own, such as portal.company.example, to their workspace. They usually configure a DNS record specified by the provider and complete some form of verification. The SaaS still serves the application, but it must accept and maintain an association between that public hostname and the corresponding tenant.

A third option is to offer both: a managed address as the default and custom domains for organizations that need a more integrated brand experience. If both addresses remain active, you need to decide which one is canonical and how links, redirects, and authentication will behave.

What need are you trying to address?

A managed subdomain usually favors operational simplicity. Customers can get started without coordinating DNS changes, while the provider maintains a consistent pattern for support, documentation, and access. It is a reasonable choice when fast onboarding matters, when the product is not presented under the customer’s brand, or when the team needs to limit variations while validating demand.

A custom domain may be important for customers who need a URL consistent with their brand, want to include the service in their own communications, or require an address under a domain they control. It may also be part of a white-label experience. However, customization does not remove dependence on the provider: the application, availability, and access management remain shared responsibilities or SaaS responsibilities, depending on the contract and design.

Start by asking what specific problem the customer is describing. “We need our own domain” might mean trust, branding, an easy-to-remember address, or an internal security requirement. Each need may call for a different response; not all of them justify the cost of building, maintaining, and supporting a custom-domain workflow.

DNS, verification, and certificates: who operates what?

With a managed subdomain, the SaaS configures DNS for its base domain and automates name assignment. The customer has fewer steps to complete. With a custom domain, by contrast, the customer usually has to publish a DNS record and wait for it to propagate. Instructions should specify the record type and expected destination, and explain how to check that the configuration is in place.

The connection method depends on the infrastructure. Some setups allow a destination hostname to be used with a CNAME; root domains may have limitations and require another mechanism supported by the DNS provider and platform. Avoid giving a one-size-fits-all recipe: the product should display instructions compatible with the specific hostname and chosen hosting design.

Verification confirms that the customer can control the domain before it is associated with their tenant. The system then needs to issue or provision the TLS certificate, check its status, and manage its lifecycle and renewal. The interface should distinguish between DNS pending, verification pending, certificate processing, active, and error states, with clear next steps. Do not show a domain as ready until the required checks have passed.

You also need to plan for changes and deprovisioning. If a customer removes a record, transfers the domain, or leaves the service, the domain may stop pointing to the SaaS or, in some scenarios, become available for another association. Defining when the link is removed, how obsolete configurations are detected, and what happens to incoming requests helps reduce confusion and risk.

Tenant isolation does not depend on the hostname

A different domain for each customer is no substitute for authorization controls. The application must resolve each request to a tenant through an association maintained and validated by the server, then check the user’s permissions for that tenant on every relevant operation. Knowing or changing a URL must not make it possible to access another organization’s data.

Avoid selecting the tenant solely from an unvalidated host value in the request. Accept only registered and associated hosts, normalize their representation, and handle ports, capitalization, and aliases carefully. An unknown host should produce a controlled response, not select a default tenant. Also account for manipulated values in headers forwarded by proxies, and trust only the proxies configured by the system.

Domain assignments should be unique where appropriate: the same host must not accidentally point to two organizations. Creation and update checks must enforce this rule even when requests occur simultaneously. Maintain a way to review associations and audit who changed them; this information helps investigate routing errors and ownership claims.

Cookies, sign-in, and links

Subdomains under the same base domain can make certain shared flows easier, but sharing a cookie through a domain attribute expands where that cookie is sent. It is not an automatic improvement. Cookie scope should be as narrow as necessary, with appropriate security attributes and a specific review of sign-in and sign-out flows.

Custom domains are separate origins from the SaaS domain and may also be separate origins from one another. This affects cookies, authentication redirects, browser-based requests, and links sent by email. Before enabling custom domains, review approved return URLs, cross-origin rules where needed, recovery links, and the URL displayed in invitations. Do not assume that a session created on one domain will automatically work on another.

If customers keep both their own domain and the managed subdomain, set explicit rules: which one is used for new links, what happens to old bookmarks, and whether traffic is redirected between them. Redirects should preserve only intended destinations and must not become a way to send users to arbitrary addresses.

Criteria for choosing and evolving your approach

Start with a decision proportionate to demand and operational capacity. A managed subdomain is often the simplest starting point if customers can use a product-branded URL. Consider custom domains when there is a recurring, verifiable need and the team can manage the full lifecycle end to end.

  • Customer autonomy: Can customers make DNS changes quickly, or do they need internal approvals?
  • Importance of branding: Is the address part of the brand experience, or just a functional way to sign in?
  • Operational capacity: Are there owners for verification, certificates, alerts, incidents, and deprovisioning?
  • Impact on identity and links: Which sign-in provider is used, and which URL do users expect in invitations and account recovery?
  • Support model: Who diagnoses DNS propagation, a pending certificate, or an incorrect configuration?

A gradual rollout lets you validate the workflow before making it a general promise. Define visible statuses, document customer tasks, provide a way to test the setup, and record operational errors. If the option is initially available only to certain customers, explain the eligibility conditions and steps clearly, without implying that it is universally available.

Pre-implementation checklist

Pre-implementation checklist
  1. Define which customer need justifies a custom domain and which alternative serves simpler cases.
  2. Design the record of allowed hosts, their exclusive association with tenants, and the verification procedure.
  3. Specify DNS instructions for each domain type and check which options the infrastructure supports.
  4. Set out the TLS workflow, provisioning statuses, alerts, and processes for errors and deprovisioning.
  5. Review isolation, cookies, authentication, redirects, links, and behavior for unknown hosts.
  6. Decide which address will be canonical, how existing links will be handled, and which team will own each incident.

The best choice is the one that meets the customer’s actual need without creating an operational burden the team cannot sustain. For many products, a managed subdomain offers a controlled starting point; for others, the customer’s own brand is part of the service’s value. Supporting both can be appropriate, provided their limits, responsibilities, and controls are designed explicitly.

Fuentes y referencias

  1. MDN Web DocsMozilla
  2. Web performanceweb.dev
  3. OWASP Cheat Sheet SeriesOWASP Foundation