How to Deploy a Website on Vercel: A Step-by-Step Guide

Vercel makes deploying modern websites effortless, whether you are using a framework like Next.js or static HTML. This guide walks you through the entire process, from connecting your repository to going live with a custom domain. You will have your site on the web in minutes.

Before you start, ensure you have a Vercel account and your website code stored in a Git repository (GitHub, GitLab, or Bitbucket). Vercel works best with Git-based workflows, enabling automatic redeploys on every push.

Article illustration

1. Connect Your Git Repository

Log in to your Vercel dashboard and click Add New → Project. Choose your Git provider and authorize Vercel to access your repositories. Select the repository containing your website code. For private repos, Vercel can still deploy them with proper permissions.

2. Configure Project Settings

Vercel automatically detects frameworks like Next.js, Gatsby, or Hugo. If it detects a framework, the default build and output settings are filled in. For a static HTML site, ensure the Build Command is left empty and the Output Directory is set to your root folder. Click Deploy.

Environment Variables

If your project needs API keys or secrets, add them in the Environment Variables section. Vercel securely injects these during build and runtime.

3. Deploy and Review

Vercel will start building your site. Once finished, it provides a preview URL like your-project.vercel.app. Visit this link to verify everything works. Every new commit to your repository triggers an automatic redeploy.

4. Set Up a Custom Domain (Optional)

Go to your project dashboard, click Domains, and add your custom domain. Follow the DNS instructions to point your domain to Vercel. Vercel handles SSL certificates automatically, so your site will be HTTPS-secure.

That’s it! Your website is now live on Vercel with continuous deployment, automatic HTTPS, and global CDN support. For advanced setups, explore Serverless Functions and preview deployments.

sarah antaboga
Author: sarah antaboga

Leave a Reply

Your email address will not be published. Required fields are marked *