Client Configuration
URL to redirect to when accessing the root domain (e.g., redirecting
yourdomain.com to app.yourdomain.com or an external site).Use Cases
Redirect to Subdomain
Redirect your root domain to a subdomain:https://yourdomain.com, they’ll be redirected to https://app.yourdomain.com.
Redirect to Marketing Site
Redirect your OpnForm instance root to your marketing website:Redirect to Specific Form
Redirect to a default form:Implementation Details
The redirect is implemented in the Nuxt client application and occurs client-side. The redirection happens when:- User visits the root path (
/) NUXT_PUBLIC_ROOT_REDIRECT_URLis set- User is not already on a specific route
/forms/:id, /login, etc.
Nginx Configuration Example
For server-side redirects (more efficient), configure your Nginx reverse proxy:Redirect Root to Subdomain
Redirect Entire Domain
Preserve Query Parameters
Caddy Configuration Example
If using Caddy for custom domains:Redirect Root Domain
Redirect Only Root Path
Subdomain Strategy
Common subdomain patterns for OpnForm deployments:app.
Main application interface
app.yourdomain.comforms.
Public form access
forms.yourdomain.comapi.
Backend API endpoint
api.yourdomain.comwww.
Marketing website
www.yourdomain.comMulti-Tenant Configuration
For white-label deployments with multiple workspaces:DNS Configuration
Set up DNS records for your subdomain strategy:Example DNS Records
Using External Services
HTTPS Considerations
Wildcard Certificates
For multiple subdomains, use a wildcard SSL certificate:app.yourdomain.comforms.yourdomain.comapi.yourdomain.com- Any other subdomain
Let’s Encrypt Wildcard
SEO Considerations
Use
301 (permanent) redirects for SEO purposes. This signals to search engines that the content has permanently moved.Canonical URLs
If your forms are accessible via multiple domains, use canonical URLs:Testing Redirects
Command Line Testing
Expected Output
Troubleshooting
Redirect Loop
Redirect Loop
Check that:
- Source and destination URLs are different
- You’re not redirecting
app.domain.comback todomain.com - Nginx/Caddy configuration doesn’t have circular redirects
- Browser cache is cleared
Redirect Not Working
Redirect Not Working
- Verify
NUXT_PUBLIC_ROOT_REDIRECT_URLis set correctly - Check Nginx/Caddy configuration is loaded (
nginx -t,caddy validate) - Reload web server after config changes
- Clear browser cache and DNS cache
- Test in incognito mode
SSL Certificate Errors
SSL Certificate Errors
- Ensure both source and destination domains have valid certificates
- For subdomains, use wildcard certificate or individual certs
- Verify certificate covers all SANs (Subject Alternative Names)
- Check certificate expiration date
Query Parameters Lost
Query Parameters Lost
Use
$is_args$args in Nginx or {uri} in Caddy to preserve:Best Practices
- Use
301redirects for permanent moves - Use
302for temporary redirects - Preserve query parameters and paths when relevant
- Use HTTPS for all redirects
- Test redirect chains don’t exceed 3 hops
- Configure redirects at the web server level for better performance
- Monitor redirect response times
Related Documentation
Custom Domains
Configure workspace custom domains
Environment Variables
All configuration options