Domain Configuration
Fataplus uses a multi-tenant domain structure built on Cloudflare’s DNS and routing capabilities.Domain Structure
The Fataplus platform uses the following domain architecture:- fata.plus - Main marketing site and CRM portal
- bknd.fata.plus - Backend API and admin interface
- [tenant].fata.plus - Multi-tenant client portals
All domains are managed through Cloudflare with nameservers:
kianchau.ns.cloudflare.comblakely.ns.cloudflare.com
DNS Setup
Fataplus domains are configured in Cloudflare DNS.Primary Domain (fata.plus)
The root domain serves the main application.Verify domain ownership
Ensure
fata.plus is added to your Cloudflare account:- Go to Cloudflare Dashboard
- Verify
fata.plusappears in your domains list - Check status is Active
Backend Subdomain (bknd.fata.plus)
The backend API runs on a dedicated subdomain.Navigate to DNS settings
- Go to Cloudflare Dashboard
- Select the
fata.plusdomain - Go to DNS > Records
Alternative: Custom Domain via Workers
You can also configure custom domains directly through Cloudflare Workers:
Cloudflare will automatically create the necessary DNS records.
Multi-Tenant Domain Routing
Fataplus supports tenant-specific subdomains:[tenant].fata.plus
Wildcard DNS Configuration
Add wildcard CNAME
In Cloudflare DNS for
fata.plus:- Type:
CNAME - Name:
*(wildcard) - Target:
fataplus-bknd-backend.fenohery.workers.dev - Proxy status: Proxied
- TTL: Auto
Tenant Routing Logic
In your Worker code (src/index.ts), implement tenant detection:
Example Tenant Domains
apollonlab.fata.plus- ApollonLab partner portaldemo.fata.plus- Demo client portalagritech.fata.plus- AgriTech vertical portal
SSL/TLS Configuration
Cloudflare provides automatic SSL/TLS for all domains.SSL Settings
Set SSL mode
Choose Full (strict) for maximum security:
- Off: No encryption (not recommended)
- Flexible: Encrypts client to Cloudflare only
- Full: Encrypts end-to-end but doesn’t validate certificate
- Full (strict): Encrypts end-to-end with certificate validation ✅
Certificate Management
Cloudflare provides:- Universal SSL: Free, auto-renewing certificates
- Wildcard SSL: Covers
*.fata.plusautomatically - Edge Certificates: Auto-provisioned within minutes
Cloudflare Workers have SSL enabled by default. No additional configuration needed for
*.workers.dev domains.Worker Routes Configuration
Define routing patterns in your Worker configuration.Backend Worker Routes
Inwrangler.json:
Multi-Route Configuration
For multiple routes:Verification and Testing
DNS Verification
Online Tools
Use these tools for verification:- DNS Checker: https://dnschecker.org
- SSL Test: https://www.ssllabs.com/ssltest/
- Cloudflare Diagnostic: https://1.1.1.1/help
Troubleshooting
Domain not resolving (NXDOMAIN)
Verify DNS records
In Cloudflare Dashboard, ensure DNS records exist for:
@(root domain)bknd*(wildcard)
SSL certificate errors
- Ensure Proxy status is enabled (orange cloud) in DNS
- Verify SSL/TLS mode is Full (strict)
- Check certificate status in SSL/TLS > Edge Certificates
- Wait a few minutes for certificate provisioning
Worker not responding on custom domain
- Verify route pattern in
wrangler.json - Ensure
zone_namematches your domain exactly - Redeploy worker:
wrangler deploy - Check DNS record points to correct Worker URL
Tenant routing not working
- Verify wildcard DNS record (
*) exists - Check Worker routing logic in code
- Test with explicit subdomain first
- Review Worker logs:
wrangler tail
Production URLs
Current production endpoints:The
*.workers.dev URL will always work as a fallback, even if custom domain DNS has issues.Best Practices
- Always use HTTPS - Redirect all HTTP traffic to HTTPS
- Enable proxy - Keep orange cloud enabled for security and performance
- Use Full (strict) SSL - Maximum security for encrypted connections
- Monitor DNS changes - Test after any DNS modifications
- Document tenant domains - Keep track of all active tenant subdomains
- Set up health checks - Monitor domain availability
- Enable HSTS - Prevent protocol downgrade attacks
Next Steps
- Review Cloudflare setup
- Configure environment variables
- Explore the API reference
- Learn about multi-tenant architecture