Custom Domain support
Our SaaS module supports custom domains, allowing tenants to connect their own branded domains (e.g., clientdomain.com) to access their tenant space.
Last updated
Our SaaS module supports custom domains, allowing tenants to connect their own branded domains (e.g., clientdomain.com) to access their tenant space.
Last updated
โ ๏ธ Automatic support for custom domains is only available on dedicated servers or VPS environments, as it requires direct web server configuration. For cPanel, enabling Addon domain with API access to addon domain will be enough.
To enable custom domain routing and automatic resolution:
The SaaS must be hosted on a dedicated server or VPS.
You must have root access to configure Nginx or Apache2.
Tenants must correctly configure their DNS A record pointing to your server's IP which will be sent via email for the tenant.
SaaS public directory should be consistent for all domains (e.g., /srv/yourDomain.com/public
).
Once your web server is configured, any tenant that maps a custom domain will be automatically routed to the correct application entry point.
All tenants share the same codebase.
๐ก Note: If you don't have wildcard domain routing configured, you can download a set of instructions which will give you instructions on how to download and run an automated shell script to add the necessary configuration for each tenant.
Simply click the "Download Instructions" action on the Tenants list page to get started.
Below are the configurations for Nginx and Apache2 to support wildcard/catch-all domain routing.
1. Update Default Server Block
Open the default server block file:
Replace or update it with:
2. Configure Dynamic Logging
Open /etc/nginx/nginx.conf
:
Add this inside the http
block:
3. Test and restart Nginx
Apache requires enabling wildcard domain support in its VirtualHost setup.
1. Create a Catch-All Virtual Host
Open your default config file:
Update it with:
Replace
/srv/yourDomain.com/public
with your actual Laravel public path.
2. Enable Required Apache Modules