Skip to content

Deploy to Netlify

Netlify deploys an AeroLaunch theme in 2 minutes, same shape as Vercel and Cloudflare Pages. Pick Netlify specifically if you’re using Netlify Forms for your contact form (see Contact form → Netlify) — that integration only works on Netlify hosting.

  1. Push your theme to GitHub, GitLab, or Bitbucket.

    Terminal window
    git init
    git add .
    git commit -m "Initial commit"
    git push -u origin main
  2. Import on Netlify: app.netlify.com/start → select your provider → pick the repo.

  3. Build settings — Netlify usually auto-detects Astro. If not:

    SettingValue
    Base directoryempty (root)
    Build commandnpm run build
    Publish directorydist
    Node version20 (set via env)
  4. The bundled netlify.toml (in every theme) already sets this:

    netlify.toml
    [build]
    command = "npm run build"
    publish = "dist"
    [build.environment]
    NODE_VERSION = "20"

    If you delete that file, configure the settings in the Netlify dashboard.

  5. Deploy. First build takes ~1–2 minutes.

Terminal window
npm install -g netlify-cli
netlify login
npm run deploy:netlify

The bundled script maps to:

Terminal window
npm run build && npx netlify deploy --prod --dir=dist

First run links the local folder to a new Netlify site; subsequent runs publish to the same site.

If you set contactForm: { provider: "netlify" } in site.ts, the Contact section renders a form with data-netlify="true" and a hidden form-name input. Netlify’s build pipeline scans deploys for those attributes and registers the form automatically.

After the first deploy:

  1. Settings → Forms → you should see the form listed as “contact”.
  2. Notifications → Add notification → Email → enter your inbox.
  3. Submit the form once to test. Submissions appear in Forms → Submissions.

Netlify’s free tier includes basic honeypot. To upgrade:

  • Honeypot — add <input name="bot-field" /> and netlify-honeypot="bot-field" to the form. Already wired in the bundled component.
  • reCAPTCHA v2 — enable in Settings → Forms → Spam filters.

By default, after submitting the form Netlify redirects to a generic success page. To redirect to your own:

  1. Create src/pages/thanks.astro (or similar).

  2. In Contact.astro, add a hidden input inside the <form>:

    <input type="hidden" name="success_url" value="/thanks/" />

…or use the action attribute on the form for a same-page redirect:

<form name="contact" method="POST" data-netlify="true" action="/thanks/">
  1. Project → Domain management → Add custom domain.
  2. Enter your domain (e.g. aurora.dev).
  3. Netlify gives you DNS records. Most apex domains use ALIAS / ANAME records that point to Netlify’s load balancer; subdomains use a CNAME.
  4. SSL is automatic.

See Custom domain for the deeper guide.