Skip to main content

Custom Domains

Connect your own domain names to your Deployxa projects. Deployxa provides free SSL certificates and automatic DNS configuration.

Overview

Custom domains allow you to:

  • Use your own domain name (e.g., example.com)
  • Create subdomains (e.g., api.example.com)
  • Set up wildcard domains (e.g., *.example.com)
  • Configure redirects
  • Manage multiple domains per project

Features:

  • Free SSL certificates
  • Automatic HTTPS
  • DNS verification
  • Wildcard support
  • Redirect rules
  • Multiple domains per project

Adding a Custom Domain

From Dashboard

  1. Go to ProjectDomains
  2. Click "Add Domain"
  3. Enter your domain (e.g., example.com)
  4. Select domain type:
    • Apex Domain: example.com
    • Subdomain: www.example.com
    • Wildcard: *.example.com
  5. Click "Add"
  6. Configure DNS records (see below)
  7. Click "Verify"

From CLI

deployxa domain add example.com --project my-app
deployxa domain add www.example.com --project my-app
deployxa domain add "*.example.com" --project my-app

From API

POST /api/projects/{projectId}/domains
{
"domain": "example.com",
"type": "apex"
}

Domain Types

Apex Domain

The root domain without any subdomain:

example.com

DNS Configuration:

Type: A
Name: @
Value: 76.76.21.21
TTL: 3600

Use cases:

  • Main website
  • Primary application
  • Landing pages

Subdomain

A subdomain of your domain:

www.example.com
api.example.com
app.example.com

DNS Configuration:

Type: CNAME
Name: www
Value: cname.deployxa.com
TTL: 3600

Use cases:

  • www subdomain
  • API endpoints
  • Separate applications
  • Staging environments

Wildcard Domain

Matches any subdomain:

*.example.com

DNS Configuration:

Type: CNAME
Name: *
Value: cname.deployxa.com
TTL: 3600

Use cases:

  • Multi-tenant applications
  • User subdomains
  • Dynamic subdomains
  • Testing environments

Note: Wildcard domains require Pro or Enterprise plan.

DNS Configuration

A Record (Apex Domains)

For apex domains, use an A record:

Type: A
Name: @
Value: 76.76.21.21
TTL: 3600

What it does:

  • Points your domain to Deployxa's IP
  • Required for apex domains
  • Cannot use CNAME for apex domains

CNAME Record (Subdomains)

For subdomains, use a CNAME record:

Type: CNAME
Name: www
Value: cname.deployxa.com
TTL: 3600

What it does:

  • Points your subdomain to Deployxa
  • Automatically routes to your project
  • Supports load balancing

DNS Propagation

DNS changes take time to propagate:

  • Typical: 5-15 minutes
  • Maximum: 48 hours
  • Most providers: Within 1 hour

Check propagation:

dig example.com A
dig www.example.com CNAME

Online tools:

SSL Certificates

Automatic Provisioning

Deployxa automatically provisions SSL certificates:

  • Provider: Let's Encrypt
  • Type: Domain Validation (DV)
  • Duration: 90 days
  • Renewal: Automatic

Certificate Status

Pending:

  • Certificate is being provisioned
  • Usually takes 1-5 minutes
  • DNS must be verified first

Active:

  • Certificate is active and valid
  • HTTPS is enabled
  • Automatic renewal scheduled

Expiring:

  • Certificate expires within 30 days
  • Automatic renewal in progress
  • No action required

Expired:

  • Certificate has expired
  • HTTPS may not work
  • Renewal failed
  • Contact support

Failed:

  • Certificate provisioning failed
  • DNS not verified
  • Rate limit exceeded
  • Contact support

Wildcard Certificates

Wildcard domains get wildcard certificates:

*.example.com

Benefits:

  • One certificate for all subdomains
  • Automatic renewal
  • No additional configuration

Custom Certificates

Upload your own certificate (Enterprise only):

  1. Go to ProjectDomains
  2. Click on your domain
  3. Click "Upload Certificate"
  4. Upload certificate and private key
  5. Click "Save"

Supported formats:

  • PEM
  • CRT
  • KEY

Redirects

Domain Redirects

Redirect one domain to another:

  1. Go to ProjectDomains
  2. Click on the source domain
  3. Click "Configure Redirect"
  4. Enter target domain
  5. Select redirect type:
    • Permanent (301): SEO-friendly
    • Temporary (302): Temporary redirect
  6. Click "Save"

Example:

Redirect: example.com → www.example.com
Type: Permanent (301)

Path Redirects

Redirect specific paths:

/old-page → /new-page
/blog/* → https://blog.example.com/$1

Configuration:

Create a configuration file in your project:

{
"redirects": [
{
"source": "/old-page",
"destination": "/new-page",
"permanent": true
},
{
"source": "/blog/*",
"destination": "https://blog.example.com/$1",
"permanent": false
}
]
}

WWW Redirect

Redirect non-www to www (or vice versa):

Non-www to www:

example.com → www.example.com

www to non-www:

www.example.com → example.com

Configuration:

  1. Add both domains to your project
  2. Set up redirect on the non-primary domain
  3. Use permanent (301) redirect for SEO

Multiple Domains

Adding Multiple Domains

You can add multiple domains to a single project:

  1. Go to ProjectDomains
  2. Click "Add Domain"
  3. Add each domain
  4. Configure DNS for each
  5. Verify each domain

Example:

example.com
www.example.com
api.example.com

Primary Domain

Set a primary domain:

  1. Go to ProjectDomains
  2. Click on the domain
  3. Click "Set as Primary"
  4. Confirm

Benefits:

  • Used in deployment URLs
  • Default for SSL certificates
  • Primary for redirects

Domain Limits

Free Tier:

  • 1 custom domain per project

Pro Tier:

  • 10 custom domains per project

Enterprise Tier:

  • Unlimited custom domains

Verification Process

Automatic Verification

Deployxa automatically verifies domains:

  1. DNS records are checked
  2. Domain ownership is verified
  3. SSL certificate is provisioned
  4. Domain is activated

Manual Verification

If automatic verification fails:

  1. Go to ProjectDomains
  2. Click on the domain
  3. Click "Verify"
  4. Wait for verification
  5. Check DNS records if failed

Verification Status

Pending:

  • DNS records not configured
  • Verification in progress
  • Wait for propagation

Verified:

  • DNS records are correct
  • Domain is verified
  • SSL certificate provisioning

Active:

  • Domain is active
  • SSL certificate is active
  • Ready to use

Failed:

  • DNS records incorrect
  • Verification failed
  • Check DNS configuration

Troubleshooting

Domain Not Verifying

Problem: Domain verification fails

Solution:

  1. Check DNS records are correct
  2. Wait for DNS propagation (up to 48 hours)
  3. Verify domain name is correct
  4. Check for typos in DNS records
  5. Try manual verification
  6. Contact support if issue persists

SSL Certificate Not Provisioning

Problem: SSL certificate shows "Pending" for too long

Solution:

  1. Verify domain is verified
  2. Check DNS records are correct
  3. Wait up to 5 minutes
  4. Try manual verification
  5. Check for rate limits
  6. Contact support if issue persists

Domain Not Loading

Problem: Domain returns error or wrong content

Solution:

  1. Check domain is verified and active
  2. Verify DNS records are correct
  3. Check SSL certificate is active
  4. Clear browser cache
  5. Try incognito/private mode
  6. Check project is deployed
  7. Contact support if issue persists

Mixed Content Warnings

Problem: Browser shows mixed content warnings

Solution:

  1. Ensure all resources use HTTPS
  2. Update asset URLs to use HTTPS
  3. Check for HTTP resources in code
  4. Use protocol-relative URLs (//)
  5. Update third-party scripts

Redirect Not Working

Problem: Redirects not working

Solution:

  1. Check redirect configuration
  2. Verify source and destination
  3. Check redirect type (301 vs 302)
  4. Clear browser cache
  5. Check for conflicting redirects
  6. Verify DNS is correct

Best Practices

Domain Setup

✅ Use www subdomain for main site ✅ Redirect non-www to www (or vice versa) ✅ Use HTTPS for all domains ✅ Set up proper DNS records ✅ Verify domains before going live

SSL Configuration

✅ Use automatic SSL certificates ✅ Enable HTTPS enforcement ✅ Use strong cipher suites ✅ Enable HSTS (HTTP Strict Transport Security) ✅ Renew certificates automatically

Performance

✅ Use CDN for static assets ✅ Enable compression ✅ Use HTTP/2 ✅ Optimize DNS TTL ✅ Use connection pooling

Security

✅ Use HTTPS only ✅ Enable HSTS ✅ Use secure cookies ✅ Implement CSP (Content Security Policy) ✅ Regular security audits

Advanced Configuration

Custom DNS

Use custom DNS providers:

Cloudflare:

Type: CNAME
Name: www
Value: cname.deployxa.com
Proxy status: DNS only (gray cloud)

AWS Route 53:

Type: A
Name: example.com
Value: 76.76.21.21
Alias: No

Google Cloud DNS:

Type: A
Name: example.com
Value: 76.76.21.21
TTL: 3600

GeoDNS

Route traffic based on location:

US users → us.example.com
EU users → eu.example.com
Asia users → asia.example.com

Configuration:

Use DNS providers with geo-routing:

  • AWS Route 53
  • Cloudflare
  • Google Cloud DNS

Load Balancing

Distribute traffic across multiple projects:

50% → project-a.deployxa.app
50% → project-b.deployxa.app

Configuration:

Use DNS providers with load balancing:

  • AWS Route 53
  • Cloudflare Load Balancing
  • Google Cloud Load Balancing

Resources


Need Help? Contact support@deployxa.com or join our community Discord.