Skip to main content
Connect a custom domain to your Netlify deployment to use your own domain name instead of the default Netlify subdomain.

Overview

The production site uses the domain services.dzaleka.com as configured in astro.config.mjs:13:
This guide will help you set up any custom domain for your deployment.

Prerequisites

  • A registered domain name (from any domain registrar)
  • Access to your domain’s DNS settings
  • A deployed site on Netlify

Adding a Custom Domain

DNS Configuration

Configure your DNS records based on your domain type. The easiest method is to use Netlify DNS:

Option 2: External DNS

If you prefer to keep DNS with your current provider:

For Subdomain (e.g., services.dzaleka.com)

Add a CNAME record: Example for Cloudflare:

For Apex Domain (e.g., dzaleka.com)

Add an A record pointing to Netlify’s load balancer:
Netlify’s IP address may change. Using Netlify DNS or a subdomain is more reliable for apex domains.
For better apex domain support, use an ALIAS or ANAME record if your DNS provider supports it:

SSL/HTTPS Setup

Netlify automatically provisions SSL certificates for custom domains.

Automatic SSL Certificate

Troubleshooting SSL

Certificate not provisioning:
  • Verify DNS records are correct
  • Wait 24-48 hours for DNS propagation
  • Check for CAA records blocking Let’s Encrypt
Mixed content warnings:
  • Ensure all resources (images, scripts) use HTTPS
  • Update hardcoded http:// URLs to https://
  • Use protocol-relative URLs: //example.com/image.jpg

Domain Redirects

Configure domain redirects for common scenarios.

www to non-www (or vice versa)

Add both domains to Netlify, and Netlify will automatically redirect the secondary domain to the primary. Example: Redirect www.dzaleka.com to dzaleka.com:
  1. Add both dzaleka.com and www.dzaleka.com
  2. Set dzaleka.com as the primary domain
  3. Netlify automatically redirects www to non-www

Custom redirects

Add custom redirects in netlify.toml:
netlify.toml

DNS Verification Tools

Use these tools to verify your DNS configuration:

Check DNS records

Online tools

Email Configuration

If you use email with your domain, preserve your email records:

MX Records

Preserve existing MX records when transferring DNS:

SPF Records

Maintain SPF records for email authentication:

DKIM Records

Keep DKIM records if configured:

Updating Site Configuration

After setting up your domain, update your site configuration:

Testing Your Domain

Verify everything works correctly:

Common Issues

DNS not propagating

Symptoms: Domain not resolving or showing old site Solutions:
  • Wait 24-48 hours for full propagation
  • Clear your DNS cache: sudo dscacheutil -flushcache (macOS)
  • Try accessing from a different network
  • Use incognito/private browsing mode

SSL certificate not provisioning

Symptoms: “Not secure” warning or no HTTPS Solutions:
  • Verify DNS records point to Netlify
  • Wait for DNS propagation
  • Check for conflicting CAA records
  • Contact Netlify support if issue persists

Domain showing Netlify default page

Symptoms: Generic Netlify page instead of your site Solutions:
  • Verify domain is added in Netlify dashboard
  • Check that DNS records are correct
  • Ensure site is deployed successfully
  • Clear browser cache

Next Steps

Netlify Deployment

Learn more about Netlify deployment options

Configuration

Customize your Astro and Tailwind configuration