Deploy a Cursor app to Netlify

Good for static sites and Next.js (adapter applied automatically).

Short answer

Push your Cursor code to GitHub, import the repo on Netlify, build with Whatever package.json says (usually npm run build), add your environment variables before the first build, add the public/_redirects refresh fallback, allow the new URL in your auth provider, then connect your domain. Netlify: Free: $0 forever — 300 credits/month; paid from $9/mo (checked 17 Oct 2026).

Specific to Cursor + Netlify
  • Next.js projects get Netlify's OpenNext adapter automatically — no config needed.
Need an always-on server?

Netlify doesn't run always-on servers. If your project has a long-running backend (websockets, bots, background jobs), use Railway or Render for that part.

Step by step

  1. Check your project type

    • Static / SPA (Vite, Astro, plain HTML): Build produces a folder of HTML/JS/CSS (dist/, build/, out/).
    • Next.js / SSR framework: next.config.* or a server adapter.
    • Long-running server (Express, FastAPI, bots, websockets): A start command like node server.js or uvicorn that must keep running.
  2. Get the code onto GitHub

    • Create a GitHub repo and push (Cursor's Source Control panel or git in the terminal).
  3. Create the project on Netlify

    In Netlify choose Add new project → Import an existing project, connect GitHub and pick your repository. Netlify detects Vite and fills in the build settings.

  4. Check the build settings

    For Vite: build command npm run build, publish directory dist. The publish directory is relative to the base directory.

    For Cursor: build command Whatever package.json says (usually npm run build), output Depends on framework.

  5. Add environment variables before the first build

    In Netlify: Project configuration → Environment variables (add them before the first build). Copy these from Cursor:

    • Everything in your local .env — never commit it; add each value in the host dashboard.

    Changed a value later? Rebuild. Vite bakes variables in at build time. Troubleshoot missing env vars

  6. Make page refreshes work (Vite / React Router single-page apps)

    public/_redirects (ends up in dist/_redirects)
    /*  /index.html  200

    Server-rendered projects (TanStack Start, Next.js) don't need this. Netlify docs (opens in a new tab)

  7. Update login redirect URLs

    Add your new Netlify URL (and later your custom domain) to your auth provider's allowed URLs. Redirect troubleshooting

  8. Add your domain

    Project → Domain management → Add a domain, then follow the DNS instructions (or delegate your domain to Netlify DNS). HTTPS is automatic.

    Domain not going live? DNS checklist

How much does Netlify cost for a Cursor app?

Free tier Free: $0 forever — 300 credits/month. Paid from $9/mo: Personal: $9/month, 1,000 credits. Pro: $20/month, 3,000 credits, unlimited members. Checked 17 Oct 2026 on Netlify's pricing page (opens in a new tab).

  • Every production deploy costs credits, so frequent auto-deploys from an AI builder eat into the free 300.
  • Long-running Node servers (Express, Hono, Fastify, WebSockets) are possible since 10 Nov 2026 via Netlify Server, but only in Early Access: free for now, 1 instance on Free/Personal, always scales to zero after 5 idle minutes, and no Next.js/Astro/Nuxt yet.

Other options for Cursor

Errors to watch for on Netlify

Related guides