← All Tutorials
DevOpsFeb 24, 20265 min read

Configure Custom Domain and SSL

Point your domain to Rackline, configure DNS records, and set up automatic SSL certificates.

Introduction

A custom domain gives your application a professional identity, and SSL encryption is essential for security and SEO. Rackline automates SSL certificate provisioning and renewal so you never have to worry about expired certificates. This tutorial walks you through DNS configuration, domain verification, and SSL setup.

Prerequisites

  • A Rackline account with a deployed application
  • A registered domain name
  • Access to your domain's DNS management panel

Step 1 — Add Your Domain to Rackline

Start by registering your domain in the Rackline dashboard or CLI. Rackline will provide you with DNS records to add at your registrar. Both apex domains (example.com) and subdomains (app.example.com) are supported.

bash
# Add an apex domain
rackline domains add example.com --project my-app

# Add a subdomain
rackline domains add app.example.com --project my-app

# View required DNS records
rackline domains dns-records example.com

Step 2 — Configure DNS Records

Add the DNS records provided by Rackline at your domain registrar. For apex domains, use an A record pointing to your droplet's IP. For subdomains, use a CNAME record pointing to your Rackline deployment URL.

text
# For apex domain (example.com):
Type: A
Host: @
Value: 143.198.xxx.xxx (your droplet IP)
TTL: 3600

# For subdomain (app.example.com):
Type: CNAME
Host: app
Value: my-app.rackline.app
TTL: 3600

# For email (recommended):
Type: MX
Host: @
Value: (your email provider's MX records)

Pro Tip

DNS propagation typically takes 15 minutes to 48 hours. Use dig +short example.com to check if your records have propagated. Rackline will automatically retry SSL provisioning until DNS is verified.

Step 3 — Verify Domain Ownership

Rackline verifies domain ownership by checking DNS records. Once verified, SSL certificates are provisioned automatically. You can also add a TXT record for faster verification if DNS propagation is slow.

bash
# Check verification status
rackline domains verify example.com

# If A/CNAME records haven't propagated, use TXT verification
rackline domains verify example.com --method txt

# This outputs a TXT record to add:
# Type: TXT
# Host: _rackline-verify
# Value: rackline-verify=abc123def456

Step 4 — SSL Certificate Management

Once your domain is verified, Rackline provisions a free SSL certificate from Let's Encrypt. Certificates are automatically renewed 30 days before expiration. For organizations requiring wildcard certificates, Rackline supports those on all plans.

bash
# Check SSL certificate status
rackline domains ssl-status example.com

# Enable wildcard SSL (covers *.example.com)
rackline domains ssl-wildcard example.com

# Force HTTPS redirect (recommended)
rackline domains configure example.com --force-https

# View certificate details
rackline domains ssl-info example.com

Conclusion

Your custom domain is now pointing to your Rackline application with automatic SSL encryption and HTTPS redirects. Certificates renew automatically, so you will never have to worry about expiration. For additional security, consider enabling HTTP/2 and HSTS headers in your application configuration.