DNS Requirements
For custom domains to work with Larafast Multi-Tenancy, proper DNS configuration is essential. The system automatically verifies DNS records before provisioning sites and SSL certificates.DNS Record Types
A Record (IPv4)
The most common configuration is to point your custom domain directly to your server’s IP address using an A record. Example:app.yourdomain.com→203.0.113.42- Or
yourdomain.com→203.0.113.42(if using @)
AAAA Record (IPv6)
If your server has an IPv6 address, you should also configure an AAAA record:CNAME Record
Alternatively, you can use a CNAME record to point to your main domain or server hostname:CNAME records cannot be used for root domains (e.g.,
yourdomain.com). Use A records for root domains.DNS Configuration by Provider
Cloudflare
- Log in to your Cloudflare dashboard
- Select your domain
- Navigate to DNS → Records
- Click Add record
- Configure:
- Type: A
- Name: app (or your subdomain)
- IPv4 address: Your server IP
- Proxy status: DNS only (orange cloud OFF)
- TTL: Auto
- Click Save
When using Cloudflare, ensure “Proxy status” is set to DNS only (gray cloud). The orange cloud (proxied) can interfere with SSL provisioning.
DigitalOcean
- Log in to your DigitalOcean account
- Navigate to Networking → Domains
- Select your domain or add a new one
- Under Add a record, select:
- Type: A
- Hostname: app
- Will Direct To: Your server IP
- TTL: 3600
- Click Create Record
AWS Route 53
- Log in to AWS Console
- Navigate to Route 53 → Hosted Zones
- Select your domain
- Click Create Record
- Configure:
- Record name: app
- Record type: A
- Value: Your server IP
- TTL: 300
- Routing policy: Simple routing
- Click Create records
Namecheap
- Log in to Namecheap
- Go to Domain List → Select your domain
- Click Manage → Advanced DNS
- Click Add New Record
- Configure:
- Type: A Record
- Host: app
- Value: Your server IP
- TTL: Automatic
- Click the checkmark to save
GoDaddy
- Log in to GoDaddy
- Go to My Products → Domains
- Click DNS next to your domain
- Under Records, click Add
- Configure:
- Type: A
- Name: app
- Value: Your server IP
- TTL: 1 Hour
- Click Save
Google Domains
- Log in to Google Domains
- Select your domain
- Click DNS on the left sidebar
- Scroll to Custom resource records
- Add a new record:
- Name: app
- Type: A
- TTL: 1H
- Data: Your server IP
- Click Add
DNS Verification Process
When a team adds a custom domain, Larafast Multi-Tenancy automatically verifies DNS configuration:1. DNS Lookup
The system performs DNS lookups to verify the domain points to your server:2. Verification Job
TheVerifyDomainDnsRecordsJob runs to check DNS:
- Queries DNS records for the custom domain
- Compares resolved IP with your server’s IP
- Updates the domain record with verification status
- Fires
DnsVerifiedevent on success
3. Retry Logic
If DNS verification fails:- The system retries up to 3 times
- Tracks retry attempts in
dns_verification_attempts - Waits between retries for DNS propagation
4. Automated Progression
Once DNS is verified:DnsVerifiedevent is firedCreateForgeSitelistener creates a Forge siteCreateForgeSiteCertificateJobprovisions SSL certificate- Team is notified when complete
DNS Propagation Time
DNS changes take time to propagate across the internet:| Provider | Typical Propagation Time |
|---|---|
| Cloudflare | 2-5 minutes |
| DigitalOcean | 5-30 minutes |
| AWS Route 53 | 1-5 minutes |
| Namecheap | 30 minutes - 2 hours |
| GoDaddy | 1 hour - 24 hours |
| Google Domains | 5-30 minutes |
You can use tools like whatsmydns.net to check DNS propagation globally.
Best Practices
1. Lower TTL Before Changes
Before configuring a custom domain:- Lower the DNS TTL to 300-600 seconds (5-10 minutes)
- Wait for the old TTL to expire
- Make your DNS changes
- After verification, you can increase TTL back to 3600 (1 hour)
2. Use Subdomains
Prefer subdomains over root domains:- ✅
app.clientdomain.com(subdomain) - ❌
clientdomain.com(root domain)
3. Disable Proxying
If using Cloudflare or similar CDN:- Disable the proxy (orange cloud) during initial setup
- Enable it after SSL is active (optional)
4. Check Before Adding
Advise your users to:- Configure DNS records first
- Wait 5-10 minutes for propagation
- Then add the domain in your application
Monitoring DNS Status
Check Domain Status
Use the Filament admin panel to check domain status:Manual DNS Check
Check DNS records manually using command line:Monitor Verification Attempts
Query the database to see verification status:Troubleshooting DNS Issues
DNS Not Resolving
Problem: DNS lookups return no results. Solution:- Verify the DNS record was created correctly
- Check for typos in the domain name
- Wait for DNS propagation (5-30 minutes)
- Use
digornslookupto verify
Wrong IP Address
Problem: DNS resolves to wrong IP address. Solution:- Update DNS record with correct IP
- Lower TTL for faster propagation
- Clear local DNS cache:
sudo dscacheutil -flushcache(macOS) - Wait for propagation
Cloudflare Proxy Issues
Problem: DNS verification fails with Cloudflare. Solution:- Click the orange cloud to make it gray (DNS only)
- Wait 2-5 minutes for changes to propagate
- Retry verification
Multiple A Records
Problem: Domain has multiple conflicting A records. Solution:- Remove old/incorrect A records
- Keep only the record pointing to your server
- Wait for DNS propagation
Advanced: Wildcard Domains
If you want to support wildcard domains (e.g.,*.clientdomain.com):
DNS Configuration
app.clientdomain.comportal.clientdomain.comanything.clientdomain.com
Server Configuration
On your Forge server, you’ll need to:- Configure Nginx to handle wildcard domains
- Use wildcard SSL certificates
- Adjust your application routing logic
Wildcard domain support requires additional configuration beyond the standard custom domains setup.
Next Steps
- SSL Certificates - Understand SSL certificate automation
- Troubleshooting - Common issues and solutions
- API Reference - Programmatic domain management

