Setting up and managing domain divisions for distinct AI service endpoints
Core Idea: Subdomain configuration creates dedicated access points for each AI service in your stack, providing clean URLs, security isolation, and improved organization through DNS and web server settings.
Key Elements
Key Principles
- Service Segregation:
- Each AI component receives its own subdomain for independent access and security boundaries.
- Consistent Naming:
- Follow logical naming patterns that reflect service purpose and function.
- Unified SSL Management:
- Apply consistent certificate issuance and renewal across all subdomains.
Why It Matters
- User Experience:
- Provides memorable, purpose-specific URLs instead of port-based access.
- Security Compartmentalization:
- Isolates services for better security control and potential access restrictions.
- Professional Presentation:
- Creates a cohesive, polished appearance for your AI infrastructure.
How to Implement
-
Plan Subdomain Structure:
Primary domain: yourdomain.com AI service subdomains: - n8n.yourdomain.com (automation) - supabase.yourdomain.com (database) - openwebui.yourdomain.com (chat interface) - flowise.yourdomain.com (flow-based AI)
-
Configure DNS Records:
Add A records in your DNS provider's dashboard: Type: A Record Name: n8n Value: [Your Server IP] TTL: 3600 (Repeat for each subdomain)
-
Set Up Reverse Proxy:
Configure Caddy, Nginx, or similar to route traffic: n8n.yourdomain.com { reverse_proxy localhost:5678 } supabase.yourdomain.com { reverse_proxy localhost:3000 }
Example
-
Scenario:
- Configuring subdomains for a Local AI Package deployment at automator.ai.
-
Application:
Complete implementation workflow:# 1. DNS Configuration (at your registrar/DNS provider) Create A records pointing to server IP 203.0.113.10: - n8n.automator.ai → 203.0.113.10 - supabase.automator.ai → 203.0.113.10 - openwebui.automator.ai → 203.0.113.10 - flowise.automator.ai → 203.0.113.10 # 2. Environment Variable Configuration CADDY_N8N_HOSTNAME=n8n.automator.ai CADDY_SUPABASE_HOSTNAME=supabase.automator.ai CADDY_OPENWEBUI_HOSTNAME=openwebui.automator.ai CADDY_FLOWISE_HOSTNAME=flowise.automator.ai CADDY_EMAIL=admin@automator.ai # 3. Caddy Automatic Configuration # (The Local AI Package uses these variables to set up Caddy)
-
Result:
- Clean, secure access to AI services through intuitive URLs like https://n8n.automator.ai and https://openwebui.automator.ai, each with proper HTTPS encryption.
Additional Connections
- Related Concepts: Caddy Server Configuration (Tool that implements subdomain routing)
- Broader Context: Domain Architecture (Strategic approach to domain organization)
- See Also: Network Design Patterns (General principles for network structure)
References
- DNS Provider Documentation
- Caddy Multi-domain Configuration Guide
- Let's Encrypt Wildcard Certificate Documentation
#subdomains #dns #web-server #configuration #urls #networking #infrastructure #https