Deploy Your Astro Site
Astro builds to fast, static HTML by default, so it runs on virtually any host. Pick a platform below for a step-by-step guide, or use the shared build settings to deploy anywhere.
Pre-Deployment Checklist
Before deploying, make sure you've configured the following.
- 1
Site URLs
Update in:
astro.config.mjs, site propertysrc/data/client.ts, SITE.urlpublic/robots.txt, Sitemap URL
- 2
Business Information
Update src/data/client.ts:
- Company name, address, phone
- Email and opening hours
- Social media links
- 3
Favicons
Replace default favicons in public/assets/favicons/
- →Generator: https://realfavicongenerator.net/
- 4
Default Social Image
Create public/assets/social.jpg (1200x600px recommended).
- 5
Decap CMS Configuration
Update public/admin/config.yml:
- Repository name
- Site URL
- DecapBridge settings
- 6
Test JSON-LD and Social Sharing
Validate before deploying.
JSON-LD Validation
- →Build locally:
- →
npm run build && npm run preview - →View page source and copy the JSON-LD script (inside <script type="application/ld+json">)
- →Validate at https://validator.schema.org/
- →Test with Google Rich Results: https://search.google.com/test/rich-results
Social Sharing
- →Facebook: https://developers.facebook.com/tools/debug/
- →Twitter: https://cards-dev.twitter.com/validator
- →LinkedIn: https://www.linkedin.com/post-inspector/
Choose a platform
Both options connect to your Git repository and redeploy automatically on every push.
Netlify
RecommendedHosting and serverless backend services for static sites and web apps. Auto-deploys on push with a generous free tier.
Vercel
RecommendedFrontend cloud with a global Edge Network. Zero-config Astro deploys and a preview URL for every push.
Static or server-rendered?
Astro is static by default. If you need server-rendered routes or API endpoints, add the platform's adapter, each guide covers the exact steps.
Static output
The default. Astro prerenders every page to HTML at build time, deploy the dist folder to any static host or CDN.
Server output (SSR)
Add an adapter with npx astro add netlify or vercel to enable on-demand rendering and serverless functions.
