← Back to Blog
Deploying to Cloudflare Pages
· Your Name Here
deployment cloudflare hosting
Deploying to Cloudflare Pages
You’ve built your site — now it’s time to share it with the world. Cloudflare Pages offers free static hosting with global CDN distribution, making it an excellent choice for Astro sites.
Why Cloudflare Pages?
- Free tier — Generous limits for personal and small projects.
- Global CDN — Your site is served from 300+ data centers worldwide.
- Automatic builds — Connect your Git repo for continuous deployment.
- Custom domains — Bring your own domain with free SSL.
Quick Deploy Steps
- Push your code to a GitHub or GitLab repository.
- Connect Cloudflare Pages to your repo via the dashboard.
- Set build settings:
- Build command:
npm run build - Build output:
dist
- Build command:
- Deploy! Cloudflare handles the rest.
Manual Deploy (Alternative)
If you prefer the CLI:
npm install -g wrangler
npm run build
wrangler pages deploy dist --project-name=your-site
That’s it — your site is live!