How to Publish a Website from Cursor
The first time you finish a project in Cursor, you'll notice there's no "publish" button. Cursor is a code editor: publishing a website from Cursor means taking the files you built there and putting them on a hosting platform. This guide covers three practical ways to do that, starting with the option that takes under a minute.
If you built a full React or Node.js app that needs a server runtime, see How to Deploy a Cursor Project for app-specific paths. This guide focuses on static HTML websites — landing pages, portfolios, one-page sites, anything that's just HTML, CSS, and JavaScript.
What you need
- A completed project in Cursor (one HTML file, or a folder with HTML, CSS, and images)
- A browser
- An account on one of the platforms below, depending on which method you use
Method 1: Paste to HTMLPub (under 1 minute)
This works when your project is a single self-contained HTML file — a landing page, portfolio, or anything where the CSS is inline and there are no external dependencies.
- In Cursor, open your HTML file. Select all the code with Cmd+A (Mac) or Ctrl+A (Windows) and copy it.
- Go to htmlpub.com.
- Paste into the editor and click Publish.
You get a live URL immediately. The free tier requires no account and no credit card, and there's no build step, no DNS configuration, and no waiting.
HTMLPub is built specifically for this scenario: paste HTML, get a live URL. If your Cursor project is self-contained in one file, this is the fastest path available. Most vibe-coded landing pages and portfolio sites fit this mold — they're one HTML file with styles and scripts baked in.
If your CSS is in a separate file and you want to combine everything, ask Cursor: "Inline all CSS and JavaScript directly into the HTML so it's one self-contained file." It will do that in about 30 seconds.
Method 2: Drag to Netlify (about 10 minutes)
If your project has separate CSS stylesheets, an images folder, or JavaScript files across multiple directories, you'll want to preserve that structure when you go live. Netlify's drag-and-drop deploy handles this without any configuration.
- In Cursor, right-click your project's root folder and select "Reveal in Finder" (Mac) or "Reveal in Explorer" (Windows).
- Go to netlify.com and sign up for a free account.
- On your dashboard, find the manual deploy area and drag your entire project folder into it.
- Netlify deploys in about 30 seconds and gives you a URL like
cheerful-panda-abc123.netlify.app.
The free tier includes 100GB of bandwidth per month, which is more than enough for personal or small commercial projects. You can add a custom domain from the Netlify dashboard whenever you're ready.
One thing worth knowing: Netlify works best when your project has an index.html at the root level. If your main file is named something else, either rename it or tell Netlify which file is the entry point in the site settings.
Method 3: GitHub and Vercel (15-20 minutes, for ongoing projects)
If you're going to keep working on this project from Cursor — updating copy, adding sections, fixing bugs — the GitHub and Vercel combination gives you automatic republishing. Every time you push a change from Cursor, the live site updates without any extra steps.
- In Cursor's integrated terminal, run
git init, thengit add ., thengit commit -m "first commit". - Create a new repository on GitHub and push your code there.
- Sign up at vercel.com and import your GitHub repository.
- Vercel detects your project type and deploys it, giving you a URL like
your-project.vercel.app.
After the initial setup, your workflow is: make changes in Cursor, push to GitHub, and Vercel handles the rest. The setup takes longer than the other two methods, but if you're shipping a project you'll iterate on, it's worth the one-time investment.
Choosing the right method
For a static site you want live right now: HTMLPub. For a multi-file project you'll update occasionally: Netlify drag-and-drop. For anything you're actively developing and iterating on regularly: GitHub and Vercel.
Most projects built during a single Cursor session start with HTMLPub, then migrate to Vercel once the project grows beyond a single file or needs regular updates.
Common issues
CSS not loading after publishing: If you pasted a single HTML file but your CSS is in a separate file referenced with <link rel="stylesheet" href="styles.css">, the stylesheet won't load because only the HTML file was pasted. Fix this by moving your CSS into an inline <style> block in the HTML, or switch to the Netlify method which preserves your folder structure.
Site works locally but looks broken when published: Usually a path issue. Cursor's local preview resolves some paths differently than a live server. Check for any ./ paths referencing local files and switch to relative paths, or ask Cursor to fix path references for production hosting.
Need a custom domain: All three platforms support custom domains. HTMLPub and Netlify handle it in the site dashboard. Vercel handles it in project settings. All three provide HTTPS automatically with no configuration required.
What's next
Once your site is live, the next task is usually iteration. Something needs a copy change, a layout fix, or a new section. The loop from Cursor edit to live update is fast on all three platforms.
For more on how to structure a full build-and-publish workflow in Cursor, see the cursor vibe coding guide. If you want a broader comparison of free hosting options, how to host a website for free covers GitHub Pages, Cloudflare Pages, and several others with honest tradeoffs. For reference on how deploy workflows differ across AI tools, how to deploy a Lovable app walks through three comparable options for Lovable projects.