๐Ÿ”ฅ All-Access Pass โ€” $199 USD (Regular $499) ยท Unlock all 2,836 Astro themes โž”
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
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.

Unlock every theme

Get lifetime access to 2,836 themes for $199 USD (Regular $499 USD).

Get All-Access Pass ($199) โž”