Skip to content

Vercel

Deploy an Astro Website to Vercel

Vercel is a modern frontend hosting platform with automatic framework detection, instant preview deploys, and a global edge network.

This guide walks you through deploying your Blacks project to Vercel.


Vercel Host

Vercel astro js themes template


Before You Begin

Make sure your Blacks project is pushed to GitHub. Read how to push on GitHub →


Step 1 — Register on Vercel

Sign up at vercel.com using your GitHub account. This connects Vercel to your repositories automatically.


Step 2 — Create a New Project

From your Vercel dashboard:

  1. Click Add New → Project
  2. Select Continue with GitHub
  3. Choose your Blacks repository from the list
  4. Click Import

Step 3 — Configure Build Settings

Vercel auto-detects Astro and fills in the settings for you. Verify they match:

SettingValue
Framework presetAstro
Build commandnpm run build
Output directorydist
Install commandnpm install

If the settings are correct, click Deploy.


Step 4 — Your Site Is Live

Vercel builds and deploys your site. When finished, your live URL is:

https://your-project.vercel.app

Every future push to your Git repository triggers an automatic build and deploy.


Automatic Deploys

Once connected, Vercel watches your repository:

ActionResult
Push to mainProduction deploy
Push to another branchPreview deploy with unique URL
Open a pull requestPreview deploy with a PR comment

You never manually deploy again.


Add a Custom Domain

To use your own domain:

  1. Go to your Vercel project dashboard
  2. Click Settings → Domains
  3. Add your domain name
  4. Vercel shows the DNS records you need to configure
  5. Log in to your domain registrar and update the records:
    • A record → Vercel’s IP
    • CNAME record → cname.vercel-dns.com
  6. Wait for DNS propagation (5–30 minutes)

HTTPS is enabled automatically once DNS is configured.

Alternative — Use Vercel Nameservers

You can also change your domain’s nameservers to Vercel’s:

  1. In Vercel, go to Settings → Domains
  2. Click Add domain and follow the setup
  3. Vercel provides nameservers (like ns1.vercel-dns.com)
  4. Log in to your domain registrar and replace your nameservers with Vercel’s
  5. Wait for propagation

Build Settings Summary

SettingValue
Framework presetAstro
Build commandnpm run build
Output directorydist
Node version20 or newer

Troubleshooting

ProblemSolution
Build failsCheck that Node.js version is 20 or newer in project settings
404 errorsVerify output directory is dist
Images not loadingCheck site URL in astro.config.mjs
Custom domain not workingWait for DNS propagation, or check records
Changes not showingHard refresh in your browser (Ctrl + Shift + R)


Next Step

Explore other hosting options:

👉 Netlify — alternative static host with drag-and-drop deploy