Environments & Domains
π Map branches from your GitHub repository to domains and servers, and manage domain settings.
This guide explains how WEMAZU handles branches and domains: we read branches from GitHub (we do not create them), and you map any branch to a domain, server, and deploy path. You can add as many such mappings as you want.
Table of Contents
- How Branches and Domains Work
- Branch-to-Domain Mapping
- Domain Configuration
- Default WEMAZU Domains
- Custom Domains
- DNS Configuration
- Domain Switching
How Branches and Domains Work
WEMAZU Does Not Create Branches
Your Git branches live in your GitHub repository. WEMAZU reads the list of branches from GitHub; we do not create or modify branches. When you add a domain, you select which branch to deploy and map it to a server and deploy path. You can add as many branchβdomain/server mappings as you want (e.g. one domain with one branch, or one domain with several branches each with their own server/path).
What You Configure
- Domain: The URL where the app is accessible (e.g.
example.com,staging.example.com). - Branch: Chosen from the branches we read from your repo (e.g.
main,develop,feature/x). - Server: The server that hosts the files (FTP, SFTP, or SSH/VPS).
- Deploy path: The directory on that server where files are deployed.
You might use one domain for a βstagingβ setup (e.g. branch develop β staging.example.com) and another for βproductionβ (e.g. branch main β example.com). Those are naming conventions you choose; WEMAZU does not auto-create any fixed staging or production branches or environments.
Branch-to-Domain Mapping
How Mapping Works
For each domain you add, you configure one or more branch rows. Each row is: branch (from GitHub) + server + deploy path + optional auto-deploy. There is no fixed βstagingβ or βproductionβ environmentβyou decide which branch goes to which domain and server.
Domain Branches
Each domain can have multiple branch configurations:
Example:
Domain: example.com
βββ Branch: main β Server A β /var/www/production (auto-deploy: ON)
βββ Branch: develop β Server A β /var/www/staging (auto-deploy: ON)
βββ Branch: feature/test β Server A β /var/www/test (auto-deploy: OFF)
Key Points:
- β Branches are read from GitHub; you select which to use.
- β Multiple branches can deploy to the same domain (with different paths).
- β Each branch row has its own server and deploy path.
- β Auto-deploy can be enabled or disabled per branch.
- β Branch names are case-insensitive (normalized).
Path Resolution
When deploying, WEMAZU uses the deploy path for the branch configuration you chose (domain branch row). If that row has a deploy path set, that is used; otherwise the domainβs default deploy path is used. If no path is configured for that branch, deployment fails with a clear error.
Domain Configuration
What is a Domain?
A domain in WEMAZU represents:
- A URL where your application is accessible
- A connection to a server
- A deployment path on that server
- Branch configurations for auto-deploy
Domain Structure
Each domain has:
- Domain Name: The URL (e.g.,
example.com,staging.example.com) - Project: Linked to a specific project
- Server: The server where files are deployed
- Deploy Path: Absolute path on server (e.g.,
/var/www/html) - Status:
pending,active,deploying,error,failed - Is Primary: Boolean flag for primary domain
Creating a Domain
Step 1: Navigate to Project
Go to your Project β Domains tab.
Step 2: Click "Add Domain"
Click the "Add Domain" button.
Step 3: Fill in Domain Details
Required Fields:
- Domain Name: Your domain (e.g.,
example.comorstaging.example.com)- β
Can include paths:
example.com/path - β
Automatically removes
http://,https://,www.prefixes
- β
Can include paths:
- Server: Select a server from your servers list
- Deploy Path: Absolute path on server (e.g.,
/var/www/html)
Optional Fields:
- Is Primary: Mark as primary domain (affects display order)
- Branches: Configure branch-specific settings:
- Branch name
- Custom deploy path (overrides domain default)
- Auto-deploy (enable/disable)
Step 4: Save Domain
Click "Save Domain". The domain is created with status pending.
Domain Status
Status Values:
pending: Domain created but not yet deployedactive: Domain has successful deploymentdeploying: Deployment in progresserror: Last deployment failedfailed: Domain configuration error
Status Transitions:
pending β deploying β active
β
error
Default WEMAZU Domains
What are Default Domains?
WEMAZU does not automatically create default domains. You must manually configure domains for each project.
However, WEMAZU can work with subdomains if you configure them:
Example Configuration:
Project: My Web App
βββ Domain 1: staging.myapp.wemazu.com β branch develop β your server
βββ Domain 2: myapp.wemazu.com β branch main β your server
Using WEMAZU Subdomains
If WEMAZU provides subdomain functionality:
- Configure DNS: Point your subdomain to your server
- Create Domain: Add the subdomain in WEMAZU and map a branch to it
- Deploy: Deploy your project to the subdomain
β οΈ Note: WEMAZU does not automatically provision subdomains or create any default domains. You configure domains and branch mappings yourself.
Custom Domains
Adding a Custom Domain
Step 1: Prepare Your Domain
Ensure you have:
- β Domain registered with a registrar
- β DNS access to configure DNS records
- β Server ready to host your application
Step 2: Configure DNS
See DNS Configuration section below.
Step 3: Add Domain in WEMAZU
- Go to Project β Domains
- Click "Add Domain"
- Enter your domain name
- Select your server
- Enter deploy path
- Save
Step 4: Verify DNS
Wait for DNS propagation (can take up to 48 hours, usually much faster), then verify:
- Domain resolves to your server IP
- SSL certificate is provisioned (if using HTTPS)
Domain Validation
WEMAZU does not currently validate domain ownership. You are responsible for:
- β Ensuring domain points to correct server
- β Configuring DNS correctly
- β Managing SSL certificates (if needed)
DNS Configuration
DNS Requirements
For your domain to work with WEMAZU, you need to configure DNS records:
Option 1: A Record (Direct IP)
Point your domain directly to your server's IP address:
Type: A
Name: @ (or your subdomain)
Value: your-server-ip (your server IP address)
TTL: 3600
Example:
example.com β your-server-ip
staging.example.com β your-server-ip
Option 2: CNAME Record (Subdomain)
Point a subdomain to another domain:
Type: CNAME
Name: staging
Value: example.com
TTL: 3600
Example:
staging.example.com β example.com
DNS Propagation
Typical Timeline:
- β Immediate: Sometimes updates are instant
- β±οΈ 5-15 minutes: Most common
- β±οΈ Up to 48 hours: Maximum (rare)
Check DNS Propagation:
- Use
digcommand:dig example.com - Use online tools: https://dnschecker.org
- Check from multiple locations
Common DNS Issues
"Domain not resolving"
Problem: Domain does not resolve to your server.
Check:
- DNS records are correct
- DNS has propagated (wait up to 48 hours)
- Server is accessible from internet
- Firewall allows connections
"SSL certificate not working"
Problem: HTTPS does not work.
Note: WEMAZU does not automatically provision SSL certificates. You must:
- Configure SSL on your server
- Use Let's Encrypt or another certificate authority
- Configure your web server (Apache/Nginx) for HTTPS
Domain Switching
What is Domain Switching?
Domain switching refers to changing which domain is used for a project, or changing the deploy path for a domain.
Changing Domain Configuration
Update Domain Settings
- Go to Project β Domains
- Click "Edit" on the domain
- Modify:
- Domain name (if DNS is updated)
- Server (if moving to different server)
- Deploy path (if changing location)
- Branch configurations
- Save changes
What Happens During Switch
If changing deploy path:
- β New deployments go to new path
- β Old files remain in old path (not deleted)
- β οΈ You may need to manually clean up old path
If changing server:
- β New deployments go to new server
- β Old files remain on old server
- β οΈ You must update DNS to point to new server
If changing domain name:
- β Domain record is updated in WEMAZU
- β οΈ You must update DNS records
- β οΈ Old domain may still work if DNS not updated
Changing Which Branch Deploys to a Domain
To change which branch is deployed to a domain (or path):
Edit the domain (or the domain-branch row):
- Change the Branch to another branch (from the list we read from GitHub)
- Optionally change server or deploy path
- Save
Deploy:
- Trigger a new deployment; the new branch is deployed to that domain/path
Best Practices for Domain Switching
- Test First: Test domain changes in a non-production environment
- Update DNS Gradually: Use low TTL before switching, then increase after
- Monitor: Watch logs and deployment status after switching
- Backup: Backup current deployment before switching
- Document: Document domain configurations for your team
Domain Status Management
Understanding Domain Status
Domain status reflects the state of the last deployment:
Status Flow:
pending β deploying β active
β
error
Status Meanings
pending: Domain created but no deployment yetdeploying: Deployment in progressactive: Last deployment succeedederror: Last deployment failedfailed: Domain configuration error
Updating Domain Status
Domain status is automatically updated during deployments:
During Deployment:
- Status automatically updates to
deployingwhen deployment starts - After successful deployment, status changes to
active - After failed deployment, status changes to
error
Manual Status Updates
You can manually update domain status if needed (via API or database), but this is typically not necessary as WEMAZU manages status automatically.
Multiple Domains per Project
Why Multiple Domains?
You can have multiple domains for the same project, each with one or more branch mappings:
Use Cases:
- Different targets (e.g. one domain for
develop, another formain) - Different regions (us.example.com, eu.example.com)
- Different features (api.example.com, app.example.com)
- A/B testing (variant-a.example.com, variant-b.example.com)
Configuration Example
Project: My Web App
βββ Domain 1: staging.example.com
β βββ Branch: develop β Server A β /var/www/staging
βββ Domain 2: example.com
β βββ Branch: main β Server B β /var/www/production
βββ Domain 3: api.example.com
βββ Branch: main β Server B β /var/www/api
Primary Domain
You can mark one domain as primary:
- β Primary domain appears first in lists
- β Used as default in some operations
- β Only one primary per project
Setting Primary:
- Go to Project β Domains
- Click "Edit" on domain
- Check "Is Primary"
- Save
Troubleshooting
"Domain not found"
Problem: Domain does not appear in project.
Check:
- Domain is linked to correct project
- You have access to the project
- Domain was not deleted
Solution:
- Verify project ID matches
- Check that the domain is linked to the correct project
- Recreate domain if needed
"Deploy path not found"
Problem: Deployment fails because path does not exist.
Check:
- Path exists on server
- Path is absolute (starts with
/) - User has permissions to path
Solution:
- SSH into server and verify path:
ls -la /var/www/html - Create path if missing:
mkdir -p /var/www/html - Set permissions:
chmod 755 /var/www/html
"DNS not resolving"
Problem: Domain does not resolve to server.
Check:
- DNS records are correct
- DNS has propagated
- Server is accessible
Solution:
- Verify DNS:
dig example.com - Check server firewall
- Wait for DNS propagation (up to 48 hours)
"Multiple domains conflicting"
Problem: Multiple domains point to same path, causing conflicts.
Solution:
- Use different deploy paths for each domain
- Or use different servers
- Or deploy different branches to same path (not recommended)
Next Steps:
- π Getting Started - Learn the basics
- π Deployment Model - Understand deployment lifecycle
- π Logs & Monitoring - Monitor your deployments