Formbricks supports both single domain and dual domain configurations with Public/Private Domain Split feature. This guide will help you set up your domains correctly for enhanced security and organization.
Formbricks supports a powerful domain separation feature that allows you to serve public content (surveys, public APIs) from a different domain than your private admin interface. This provides enhanced security and better organization. It enables you to:
Serve public content (surveys, public APIs) from a different domain than your private admin interface
Restrict admin functionality to the private domain
Ensure authentication and sensitive operations only occur on the private domain
Publicly available images uploaded before the domain split (logos, images in Picture Select questions, etc.) will continue to be served from the Private Domain. To protect your Private Domain, please reupload public images after the successful setup of the domain split.
Private Domain (WEBAPP_URL): Your admin/management interface
Public Domain (PUBLIC_URL): For surveys and public-facing content
Important Security Note: Formbricks handles application-level domain restrictions to ensure each domain
can only access specific resources within the application. However, all domain configuration (DNS, SSL
certificates, reverse proxy setup) and firewall configuration that comes with this feature to enhance
security must be configured by you. Formbricks does not manage your infrastructure-level security settings.
# Private admin domainWEBAPP_URL=https://admin.formbricks.example.comBETTER_AUTH_URL=https://admin.formbricks.example.com# Public domain for surveysPUBLIC_URL=https://surveys.example.com
All other routes are restricted to the private domain (WEBAPP_URL) for security purposes. The admin domain can access the health endpoint (/health) and public file storage (/storage/{workspaceId}/{accessType}/{fileName}), while all other public routes are exclusively accessible on the public domain (PUBLIC_URL) and will return a 404 error if accessed from the admin domain.
While it’s possible to revert to a Single Domain setup, please take into account the following:
All image links and uploaded files are stored in the database, so they will continue to link to the Public Domain hence the links will break. You’ll need to reupload the images, like you did when you set up the domain split.
Any survey link shared to with the Public Domain will break.
API calls to the Public Domain will break, unless updated.
As of now, Formbricks does not provide an automated migration between domain setups.If you have any questions or require help, feel free to reach out to us on GitHub Discussions.