---
name: deploy-to-netlify-checklist
description: "A launch checklist for Netlify covering build command, redirects, functions, environment and domain, with a quick test of each before go-live. Use when a site is going live on Netlify and its build command, redirects, functions and domain need checking before launch. Do not use for migrating redirects from a legacy server or choosing a hosting provider. Related topics: devops, coding."
---

# Deploy to Netlify Checklist

A launch checklist for Netlify covering build command, redirects, functions, environment and domain, with a quick test of each before go-live.

## When to use

Use this skill when a site is going live on Netlify and its build command, redirects, functions and domain need checking before launch. Do not use it for migrating redirects from a legacy server or choosing a hosting provider.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Write the build settings into a netlify.toml, listing command, publish and base directories and the runtime version.
3. Draft the redirect and header rules in priority order, with the single page fallback and 301s for old URLs.
4. List each function with its directory, timeout and required environment names.
5. Set out the domain and certificate steps, including which hostname redirects to which.
6. Define preview checks for deep links, the 404 page and a function call, then the go or no-go line and the restore steps.

## Inputs

- **Site type** (choose one: Static site, Single page app, Framework with server functions)
- **Build command and publish folder** (free text, e.g. "Both as used locally")
- **Redirect and header needs** (longer free text)
- **Functions in use** (longer free text)
- **Environment variable names** (longer free text)
- **Domain plan** (free text, e.g. "Domain and registrar or none")

## Output

A checklist with a draft netlify.toml, ordered redirect rules, function and environment tables, domain steps, preview checks and a go or no-go line with restore steps.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### Deploy to Netlify Checklist

Prepare this site for a Netlify deploy.

- Site type: {{Site type}}
- Build command and publish folder: {{Build command and publish folder}}
- Redirect and header needs: {{Redirect and header needs}}
- Functions in use: {{Functions in use}}
- Environment variable names: {{Environment variable names}}
- Domain plan: {{Domain plan}}

Build the checklist in order. Settings: build command, publish directory, base directory and Node version, written into a netlify.toml so the setup lives in the repository. Redirects: a single page app needs a catch-all rewrite to index.html with status 200, old URLs need 301 entries, and rules are read top to bottom so specific ones go first. Functions: directory, runtime, timeout, and the environment names each needs. Environment: names by deploy context, and a reminder that values are set in the dashboard, never committed. Domain: DNS records, HTTPS certificate, and the redirect from the non-preferred hostname. Verify on a deploy preview: deep links, the 404 page, a form or function call, and response headers. End with a go or no-go line and the steps to restore the previous deploy.

## Pitfalls

- Placing the catch-all rewrite above specific redirects, so the 301 rules never fire.
- Committing environment values to netlify.toml instead of the dashboard, which publishes them in the repository.
- Testing only the home page, so a broken deep link on the single page app reaches visitors.
