Configuration
Domain Configuration
Configuring your domain for Formbricks.
Formbricks supports both single domain and second domain configurations. This guide will help you set up your domains correctly.
Single Domain Setup
For a single domain setup, you need to configure two essential environment variables:
WEBAPP_URL
: The base URL of your Formbricks instanceNEXTAUTH_URL
: The authentication URL (should be the same as WEBAPP_URL)
Example Configuration
Important Notes
- Both URLs must be the same for authentication to work properly
- The URLs should be the full URL including the protocol (http:// or https://)
- Make sure your domain is properly configured in your DNS settings
- If youβre using HTTPS (recommended), ensure you have valid SSL certificates installed
Second Domain Setup (Survey Domain)
Formbricks allows you to serve surveys from a different domain than your main application. This is useful for:
- Separating your admin interface from public surveys
- Using a dedicated domain for surveys
Configuration
To set up a second domain for surveys:
- Set up DNS records for your survey domain (e.g.,
surveys.example.com
) - Configure your web server or reverse proxy to route requests from the survey domain to the Formbricks application
- Set the
SURVEY_URL
environment variable to your survey domain
Example Configuration
Important Notes
- The
SURVEY_URL
must be a valid URL with protocol - When
SURVEY_URL
is set, all public survey links will use this domain. - If
SURVEY_URL
is not set, surveys will be served from theWEBAPP_URL
domain - Make sure your DNS and SSL certificates are properly configured for both domains
- The survey domain should be properly configured in your reverse proxy or web server
- Important: The second domain is exclusively for serving surveys. Any non-survey paths accessed on this domain will return a 404 error. This is a security feature to ensure the survey domain only serves survey content.
If you have any questions or require help, feel free to reach out to us on GitHub Discussions.
Was this page helpful?