1 Hour to Deploy Your First Site
Get your first website live on the internet in 60 minutes. Free, with HTTPS, auto-deploys on git push.
By the end of this hour, your site will be live at a real URL, served over HTTPS, completely free, with auto-deploys on every git push.
๐ฏ What You'll Build
A live personal landing page at:
https://yourname.pages.dev
(Or your own custom domain)
โฑ๏ธ Time Breakdown
๐ Prerequisites
- A GitHub account
- A Cloudflare account (both free)
- Git installed
- Text editor
Step 1: Create Your Site (0โ10 min)
mkdir my-first-site
cd my-first-site
Create index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hi, I'm Your Name</title>
<style>
body {
font-family: -apple-system, system-ui, sans-serif;
max-width: 600px;
margin: 80px auto;
padding: 0 20px;
line-height: 1.6;
}
h1 { font-size: 2.5rem; }
a { color: #FF6B35; text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
</head>
<body>
<h1>Hi, I'm Your Name ๐</h1>
<p>Building things on the internet.</p>
<p>
<a href="https://github.com/yourname">GitHub</a> ยท
<a href="https://twitter.com/yourname">Twitter</a> ยท
<a href="mailto:you@example.com">Email</a>
</p>
</body>
</html>
Open it locally:
open index.html # Mac
xdg-open index.html # Linux
start index.html # Windows
Checkpoint
Your site loads in the browser with your name and links visible.
Step 2: Push to GitHub (10โ25 min)
git init
git add .
git commit -m "Initial commit"
Create a repo on github.com/new:
- Name:
my-first-site - Visibility: Public
- Don't initialize with README
Push:
git remote add origin https://github.com/YOUR-USERNAME/my-first-site.git
git branch -M main
git push -u origin main
Use a Personal Access Token instead of password if asked.
Checkpoint
Refresh your repo page on GitHub. You should see index.html.
Step 3: Deploy with Cloudflare Pages (25โ45 min)
- Go to dash.cloudflare.com
- Workers & Pages โ Create โ Pages tab
- Connect to Git โ authorize GitHub
- Select
my-first-siterepository
Build settings:
| Field | Value |
|---|---|
| Project name | my-first-site |
| Production branch | main |
| Framework preset | None |
| Build command | (empty) |
| Build output directory | / |
Click Save and Deploy. Wait ~1 min.
Checkpoint
Visit https://my-first-site.pages.dev. Your site is live! ๐
Step 4: Custom Domain (Optional, 45โ55 min)
If you have a domain:
- Project โ Custom domains โ Set up a custom domain
- Enter your domain (e.g.,
yourname.com) - If your domain uses Cloudflare DNS, it auto-configures
- Otherwise, add a CNAME record pointing to
my-first-site.pages.dev
Wait 1โ5 min for DNS propagation.
Step 5: Test Auto-Deploy (55โ60 min)
Make a change:
<h1>Hi, I'm Your Name โจ</h1>
Push:
git add .
git commit -m "Update emoji"
git push
Within 30 seconds: Cloudflare detects the push, rebuilds, and updates your site.
๐ Continuous deployment pipeline complete!
๐ Bonus
- Custom 404: Drop
404.htmlin your repo - Analytics: Pages โ Settings โ Web Analytics โ Enable (privacy-friendly)
- Favicon: Drop
favicon.icoin repo root - OG tags: Add to
<head>for better social previews
<meta property="og:title" content="Your Name">
<meta property="og:description" content="Building things on the internet">
<meta property="og:image" content="https://yourname.com/og.png">