How to Deploy a Cursor Project: Two Paths to a Live URL
You built something in Cursor. The code works locally. Now you need it on the internet.
The fastest path depends on what Cursor built for you. Static HTML pages deploy in under a minute through HTMLPub with no setup required. Framework-based apps (React, Next.js, etc.) need a build step and deploy best to Vercel. Both are free. Here's how each one works.
What You Need
For the HTML path:
- The HTML file Cursor generated
- An HTMLPub account (free tier works, no credit card)
For the full app path:
- Your Cursor project pushed to a GitHub repository
- A Vercel account (free tier works)
Step 1: Identify What Cursor Built
Open your project folder. If there's an index.html file with most of your UI written directly into it, you have a static HTML page. No build step needed. Use the HTMLPub path.
If your project has a package.json, a src/ directory, and component files (.jsx, .tsx, .vue), you have a framework-based app. It needs to be built and served properly. Use the Vercel path.
Not sure? Open the index.html if it exists. If the whole page is in there with styles and scripts inline or linked, it's static. If it's a minimal file with just a <div id="root"></div>, the real code lives in the framework components.
Path 1: Static HTML to HTMLPub
This is the fastest option. From Cursor to a live URL takes about 60 seconds.
Step 2: Copy the HTML
Open your index.html in Cursor or a text editor. Select all (Cmd+A on Mac, Ctrl+A on Windows) and copy the full file contents.
One thing to check before you copy: if your HTML references external CSS or JS files (like <link href="styles.css"> or <script src="app.js">), those won't work after you paste. Ask Cursor to inline all styles and scripts into a single self-contained HTML file before you copy. In Cursor, just say: "Combine everything into one self-contained HTML file with all CSS and JavaScript inline."
Step 3: Publish to HTMLPub
Go to htmlpub.com. Paste your HTML into the editor. Click Publish.
Step 4: Get Your URL
HTMLPub gives you a live URL immediately. Share it, test it on your phone, send it to someone for feedback. No account required on the free tier. For a custom domain or publishing more than one page, paid plans start at $10/month.
What you should see: your page exactly as Cursor designed it, with the correct styles and layout. If something looks off, the most common cause is a broken relative path to a CSS or image file.
Path 2: Full App to Vercel
This takes a few more minutes but handles any framework Cursor might have used.
Step 2: Push to GitHub
If your project isn't already in a GitHub repo, create one. In Cursor's terminal, run:
git init
git add .
git commit -m "initial build"
Then create a new repo on GitHub and push your code to it.
Step 3: Connect to Vercel
Go to vercel.com, sign in with GitHub, and click Import Project. Select your repository. Vercel detects the framework automatically (React, Next.js, Vite, etc.) and sets the correct build command. You usually don't need to change anything.
Step 4: Deploy
Click Deploy. Vercel builds your project and gives you a URL on the vercel.app subdomain within a couple of minutes on the free tier. Every subsequent push to main auto-deploys.
For a custom domain, add it in the Vercel project settings. The free plan covers unlimited personal projects and the subdomain indefinitely.
Common Issues
Styles look wrong on HTMLPub. The HTML references a separate CSS file that didn't come along when you copied. Fix: ask Cursor to combine everything into a single self-contained HTML file, or manually move your CSS into a <style> tag in the <head>.
Mobile layout is broken on HTMLPub. Cursor sometimes skips the viewport meta tag when generating desktop-first pages. Add this line inside your <head> if it's missing: <meta name="viewport" content="width=device-width, initial-scale=1">.
Build fails on Vercel. Check the build log for the specific error. Common causes: a missing environment variable (add it in the Vercel project settings under Environment Variables) or a Node version mismatch (set your Node version in the Vercel settings to match what you're running locally).
Cursor generated a dist/ folder already. If you ran the build command locally, Vercel can either re-build from source or serve the static dist folder directly. Easiest path: delete the dist/ folder from your repo, let Vercel handle the build.
What's Next
If you're deploying a single HTML page and want to understand all your free hosting options beyond HTMLPub, the guide to hosting a website for free covers HTMLPub, GitHub Pages, Netlify, and Cloudflare Pages with an honest comparison of each.
For the full Cursor workflow from first prompt to live site, the cursor vibe coding guide covers how the build-and-iterate process works in Cursor's Agent mode. And if you're also deploying Lovable projects, the deploy Lovable app guide uses the same structure for that tool.