komal.nakrani
Browse Themes
ThemesCategoriesDocsBlogTips & Tricks
Docs/Going Live/Custom Domains

Custom Domains

Point your own domain at a deployed theme and keep canonical URLs correct.

Updated: September 2026·License: Commercial & Personal

1. Set the site URL first

Before pointing DNS, update astro.config.mjs and redeploy. Canonical tags, the sitemap and the RSS feed are generated from this value:

js
export default defineConfig({
  site: 'https://your-domain.com',
});

2. Add the domain to your host

On Cloudflare Pages: your project → Custom domains → Set up a domain. The dashboard tells you the record to create.

3. Create the DNS record

Type Name Target
CNAME www your-project.pages.dev
CNAME store your-project.pages.dev

A subdomain takes a CNAME pointing at the deployment host. For an apex domain (example.com with no subdomain), use your provider's flattening feature — Cloudflare calls it CNAME flattening — or the ALIAS/ANAME record type if they offer one.

4. Wait, then verify

DNS changes propagate in minutes to a few hours. Check whether a record is live before assuming the deploy is broken:

bash
dig +short store.your-domain.com

An empty response means the record has not propagated yet. Certificates are issued automatically once it has.

Explore production-ready themes

Hand-built Astro themes — SaaS, storefront, portfolio, and dashboard.

Browse All Themes ➔