How-To Guide
How to Deploy a Website with Netlify
Netlify is the fastest way to get a website online — connect your GitHub repo, and every push auto-deploys in seconds. Here's the complete walkthrough.
🎯 What You'll End Up With
By the end of this guide, your site will be live at a URL anyone can visit:
Live on Netlify ✅
Deployed in 30 seconds — no server setup required.
🚀 Why Netlify Instead of GitHub Pages?
Both are free. Both work great. But Netlify has some advantages:
| Feature | GitHub Pages | Netlify |
|---|---|---|
| Setup time | 5 min | 2 min |
| Auto-deploy on push | ✅ Yes | ✅ Yes (faster) |
| Deploy time | 1-2 min | 15-30 sec |
| Free SSL | ✅ | ✅ |
| Custom domain | ✅ | ✅ (easier) |
| Redirects & headers | ❌ | ✅ Free |
| Form handling | ❌ | ✅ 100 submissions/mo free |
| Preview deploys (per PR) | ❌ | ✅ Yes |
| Rollback deploys | ❌ | ✅ One-click |
💡 My honest take: Use GitHub Pages for personal projects. Use Netlify if you want preview deploys, form handling, or if you're working with a team. Both are excellent.
📋 What You'll Need
- A Netlify account — sign up free (takes 30 seconds with GitHub)
- A GitHub account with your website code in a repo (for auto-deploy)
- Or just your website files locally (for drag-and-drop deploy)
- About 10 minutes
Sign Up for Netlify
Go to:
👉 app.netlify.com/signup
;The fastest way is to sign up with your GitHub account:
- Click "Sign up with GitHub"
- Authorize Netlify to access your repos
- You're in — no credit card needed
💡 Sign up with GitHub, always. It saves a step later when you connect a repository for deployment.
Deploy Your Site
Netlify gives you two ways to deploy. Pick whichever fits:
Option A: Connect a GitHub repo (recommended)
- From your Netlify dashboard, click "Add new site" → "Import an existing project"
- Choose GitHub
- Pick your repository (e.g.,
my-website) - Leave the build settings as-is for static HTML (no build command, publish directory =
/) - Click "Deploy site"
Every future git push to this repo will trigger an automatic redeploy.
Option B: Drag-and-drop deploy (fastest, no GitHub needed)
- Go to app.netlify.com/drop ;
- Drag your entire website folder into the box
- Wait 10 seconds — your site is live
To update: drag the folder again. No version control required.
Wait for the First Deploy
Netlify shows a live log of what's happening. For a static HTML site, it looks like this:
10:23:01 PM: Build ready to start
10:23:02 PM: Fetching files...
10:23:03 PM: Starting deploy...
10:23:05 PM: Site is live ✅
Total time: 15-30 seconds for a typical site.
✅ Netlify automatically gives you a free SSL certificate. Your site is served over HTTPS from day one.
Visit Your Live Site
Netlify assigns you a random subdomain like:
https://sparkly-unicorn-1234.netlify.app
You can rename it to something cleaner:
- Go to Site settings → Site details
- Click "Change site name"
- Enter your preferred name (e.g.,
my-portfolio) - Save — your new URL is
https://my-portfolio.netlify.app
💡 Pick a professional name. my-portfolio.netlify.app looks much better than sparkly-unicorn-1234.netlify.app on a resume.
Connect Your Custom Domain
Have a domain? Netlify makes it easy (easier than GitHub Pages).
1. Add the domain in Netlify
- Site settings → Domain management
- Click "Add custom domain"
- Enter your domain (e.g.,
yourname.com) - Click "Verify" → "Add domain"
2. Two options for DNS
Option A (easiest): Change your registrar's nameservers to Netlify's. Netlify handles all DNS for you. Recommended if you bought the domain specifically for this site.
Option B (keep your DNS): Add these records at your registrar:
# A record for apex (yourdomain.com)
75.2.60.5
# CNAME for www
www → your-site.netlify.app
3. Enable HTTPS
Netlify provisions a free SSL certificate automatically. It may take up to 24 hours if DNS just propagated.
Set Up Auto-Deploy (If Using GitHub)
This is Netlify's killer feature. Once your repo is connected, every push auto-deploys.
Test it:
- Make a small change to
index.htmlin your repo (via GitHub or locally) - Commit and push
- Netlify starts a new deploy automatically
- 30 seconds later, your live site is updated
✅ Zero manual steps. No FTP, no SSH, no "upload" button. This is the modern deployment workflow.
Bonus: Netlify Forms (Free Contact Forms)
Netlify has a built-in form handler that works without any backend. You get 100 free submissions per month.
Add netlify to any HTML form:
<form name="contact" method="POST" data-netlify="true">
<input type="text" name="name" placeholder="Your name">
<input type="email" name="email" placeholder="Your email">
<textarea name="message" placeholder="Message"></textarea>
<button type="submit">Send</button>
</form>
That's it. Netlify detects the form on deploy and captures submissions in your dashboard.
💡 Compare: GitHub Pages has no form handling. With GitHub Pages you'd need Formspree, EmailJS, or a similar service. Netlify does it for free.
🔧 Common Issues (and Fixes)
❌ Deploy failed: "Build command failed"
You're deploying a static site but Netlify is trying to run a build. Fix:
- Site settings → Build & deploy → Build settings
- Set "Build command" to blank
- Set "Publish directory" to
/(or.) - Trigger a new deploy
❌ 404 on all pages except the homepage
Your site is likely a Single Page App (SPA). Add a _redirects file to your repo root with:
/* /index.html 200
❌ Custom domain shows "Netlify error: DNS not configured"
DNS propagation can take up to 24 hours. Check your records with dnschecker.org. For apex domains, make sure you're using the 75.2.60.5 A record.
❌ HTTPS certificate won't provision
Common causes:
- DNS hasn't propagated yet — wait 24 hours
- You have CAA records at your registrar that block Let's Encrypt
- You have conflicting DNS records (multiple A records for the same hostname)
❌ Form submissions aren't appearing in dashboard
Make sure you have data-netlify="true" on the form AND a unique name attribute. Netlify only detects forms at build time — you must redeploy after adding a form.
❌ Accidentally deleted the wrong deploy
Netlify keeps every deploy. Go to Deploys → find a previous successful deploy → click "Publish deploy" to roll back instantly.
⚖️ Should You Use Both?
Yes — and many developers do. Here's the split I recommend:
- GitHub Pages — for personal sites, portfolios, course projects. Zero config, integrated with GitHub.
- Netlify — for client work, projects that need forms, or anything with a build step.
- Vercel — a third option, best for Next.js/React projects.
💡 Pro tip: Deploy your personal site to both. Point your custom domain to whichever performs better for you. It costs nothing to have both live.
🎯 What's Next?
Your site is live on Netlify. Now what?