What Netlify is
Netlify is a hosting platform built for modern websites. It's what you use when you want to put your HTML/CSS/JS project online without touching servers, DNS settings, or terminal commands (unless you want to).
Drag-to-deploy
Drop your site folder onto the dashboard. It's live in seconds with a sharable URL.
Git integration
Connect your GitHub repo. Every push to main auto-deploys. Pull requests get preview URLs.
HTTPS free
Automatic SSL certificates from Let's Encrypt. No config, no renewals.
Global CDN
Your site is cached on servers worldwide. Fast for users in Tokyo and Toronto.
Forms included
Add one attribute to any <form> and Netlify captures submissions for free.
Custom domains
Point yoursite.com at Netlify in minutes. Free subdomain if you don't have one.
bandwidth/month
(free tier)
build minutes/month
(free tier)
form submissions/month
(free tier)
sites you can deploy
Method 1 — drag & drop (easiest)
Have a plain HTML/CSS/JS folder? Use this. No Git, no CLI, no account setup beyond a free signup.
The 4-step drag-drop flow ~60 seconds
- Go to app.netlify.com/drop
- Sign in with GitHub, Google, or email (free, 30 seconds)
- Drag your entire project folder onto the upload zone
- Get a live URL like
https://brilliant-cat-123abc.netlify.app
index.html — that's what Netlify serves
by default.
Method 2 — connect a GitHub repo (pro setup)
This is how real sites ship. Push code → Netlify auto-builds & deploys. Every branch gets its own preview URL. You get rollbacks for free.
The GitHub flow ~5 minutes, one-time setup
- Push your project to a GitHub repository
- In Netlify dashboard, click Add new site → Import from Git
- Authorize Netlify to access your GitHub
- Pick your repo from the list
- For plain HTML/CSS/JS sites, leave build command blank and publish directory as
/ - Click Deploy — your site is live in 20 seconds
- Every future
git pushto main auto-deploys 🎉
Build settings for common frameworks
Build command: (leave blank) Publish directory: .
Build command: npm run build Publish directory: dist
Build command: npm run build Publish directory: .next # Netlify auto-detects Next.js and installs the adapter
Build command: npm run build Publish directory: dist
Method 3 — the Netlify CLI (for power users)
When you want to deploy from your terminal, preview locally, or script deploys into CI.
# Install the CLI once, globally npm install -g netlify-cli # Log in (opens a browser for auth) netlify login
# From inside your project folder: # Deploy a draft URL (safe — doesn't overwrite production) netlify deploy # Deploy to production netlify deploy --prod
# Runs your dev server + Netlify Edge locally. # Forms, functions, and redirects all work as they would in production. netlify dev
Rename your site — ditch the random URL
When you first deploy, Netlify gives you a charming-but-random subdomain like
brilliant-cat-123abc.netlify.app. That's fine for a test, but
not for sharing with a client, a professor, or on your résumé. Rename it in 30 seconds.
Option A — Rename from the dashboard (most common)
Change the site name & subdomain via Project configuration
- Open your site in the Netlify dashboard
- Click Project configuration (in the left sidebar — older UIs say "Site settings")
- Under Site details → Site information, find Site name and click Change site name
- Type your new name. Rules:
- Lowercase letters, numbers, and hyphens only
- Must be globally unique across all of Netlify
- 3–37 characters
- Click Save — your URL instantly becomes
your-new-name.netlify.app
jane-gilliam-portfolio,
acme-coffee-nyc,
cs200-final-project.
Skip: generic names like
my-site or
portfolio — they're almost certainly taken.
Option B — Use netlify.toml for build + env config
A netlify.toml file at your project root lets you version-control
build settings, redirects, headers, and environment variables. It's perfect for team
projects — settings move with the repo.
# Save this as netlify.toml at your project root
[build]
# Folder Netlify serves after the build finishes
publish = "dist"
# Command Netlify runs to build your site
command = "npm run build"
# Base directory (only for monorepos — usually omit)
# base = "packages/web"
[build.environment]
# Node version used during the build
NODE_VERSION = "20"
# Any env vars your build needs
VITE_API_URL = "https://api.example.com"
# Pretty URLs — strip .html from every page
[[redirects]]
from = "/:page.html"
to = "/:page"
status = 301
# Security headers for every response
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"[build] publish → Which folder to deploy (dist, build, public, .) command → Shell command to produce that folder base → Only for monorepos; where to run npm install [build.environment] Build-time only env vars. For runtime vars (Netlify Functions), use the dashboard UI. [[redirects]] Double brackets = list — you can add as many as you want. Each needs from / to / status. [[headers]] Same double-bracket pattern for response headers. Apply security, caching, CORS rules per path. # Tip: comments start with # and are ignored. # netlify.toml is TOML format (similar to INI files).
name field
is not set in netlify.toml — it lives only in the
dashboard (or via netlify api updateSite from the CLI). The
.toml file handles build configuration; the dashboard
handles site identity.
Netlify Forms — no backend required
Add data-netlify="true" to any form. Submissions land in your
dashboard, with optional email notifications and spam protection.
<form name="contact"
method="POST"
data-netlify="true">
<!-- Hidden input required by Netlify to name the form -->
<input type="hidden" name="form-name" value="contact">
<label>Name
<input type="text" name="name" required>
</label>
<label>Email
<input type="email" name="email" required>
</label>
<label>Message
<textarea name="message" required></textarea>
</label>
<button type="submit">Send</button>
</form><form name="contact"
method="POST"
data-netlify="true"
data-netlify-honeypot="bot-field">
<!-- Hidden field humans skip, bots fill in — silent spam filter -->
<p style="display:none;">
<label>Don't fill this out: <input name="bot-field"></label>
</p>
<!-- ...rest of your form -->
</form>Custom domain in 3 clicks
Netlify gives you a .netlify.app URL free. To use your own
domain:
- In your site dashboard → Domain settings → Add a custom domain
- Type your domain (e.g.
yourname.com) and click Verify - Either point your DNS to Netlify (they give you the nameservers) or add a CNAME record at your registrar. Both work.
- SSL certificate is issued automatically within a few minutes
.com domains for $8–$12/year. Netlify also resells them
directly if you want one-click setup.
Redirects, headers, and _redirects
Drop a _redirects or netlify.toml
file in your project root for advanced routing.
# Old URL → new URL (permanent, 301) /old-page /new-page 301 # Short URL → external link /github https://github.com/yourname 302 # SPA fallback — any unmatched route goes to index.html /* /index.html 200
# netlify.toml lives at the project root
[build]
publish = "dist"
command = "npm run build"
[[redirects]]
from = "/old-page"
to = "/new-page"
status = 301
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"Why Netlify is perfect for students
Genuinely free
The free tier isn't a trial. Personal sites, portfolios, and small class projects all fit comfortably inside it.
Shareable URLs
Every deploy has a unique URL. Send it to your instructor, include it on résumés — it just works.
Instant rollbacks
Every deploy is saved. Break something? Click "restore" next to the last good build.
Deploy previews
Every pull request gets its own live URL. Perfect for group projects — review before merging.