Docs Menu
Docs Home
/ /
Atlas App Services
/ /

Migrate Static Hosting to Vercel

On this page

  • Before You Begin
  • Deploy with Git
  • Deploy with the Vercel CLI
  • Install Vercel CLI
  • Login to Vercel
  • Deploy to Vercel
  • Update DNS records (optional)
  • Shut Down Atlas App Services Hosting
  • Deployment Protection on Vercel
  • Learn More

Important

Always refer to the official documentation of both MongoDB Atlas and Vercel for the most up-to-date and accurate information. Specific steps may vary depending on the details of your project and the technologies used.

Vercel is well-suited for hosting and web site or application, including static sites, single-page applications (SPAs), dynamic server-rendered applications, and more. It is compatible with your App Services application.

Migrating a web application from MongoDB Atlas hosting to Vercel involves a few key steps. Below is a general guide to help you through the process.

  • As a precaution, ensure that you have a backup of your application and data before making any significant changes.

  • Create a Vercel account. To learn how to create deployments on Vercel, visit the official Vercel docs. We will be showing you how to deploy using Git and the Vercel CLI below.

  • If your application isn't already in a version control system, consider setting it up. Vercel seamlessly integrates with popular version control platforms.

Vercel documentation: Deploy with Git

  1. Push your code to your git repository (GitHub, GitLab, BitBucket).

  2. Import your project into Vercel.

  3. Optionally configure your project before it's deployed.

  4. Select the Deploy button to initiative a deployment.

  5. Your application is deployed! (e.g. create-react-template.vercel.app)

Vercel documentation: Deploy from CLI

1

Install the Vercel CLI on your local machine. This allows you to deploy and manage your projects using the command line.

npm i -g vercel

Vercel documentation: https://vercel.com/docs/cli#installing-vercel-cli

2

Log in to your Vercel account using the CLI

vercel login
3

Deploy your application to Vercel using the following command:

vercel deploy

Follow the prompts to complete the deployment process.

4

If your domain is currently pointed to MongoDB Atlas and you want to use the same domain with Vercel, update your DNS records to point to the Vercel domain.

5

Once you have verified that your application deploys successfully to Vercel, delete your hosted files from your Atlas App Services app. As a reminder, hosting domains on Atlas App Services will no longer run starting on March 12, 2025.

When you create a deployment, Vercel automatically adds a new and unique generated URL. You can visit this URL to preview your changes in a live environment.

After deploying, your new site will automatically be assigned a .vercel.app suffixed domain. You can then add a Custom Domain of your choice, either from a third-party or purchased through Vercel.

Vercel documentation: Deployment Protection

Vercel offers the following Deployment Protection features:

  • Vercel Authentication: Restricts access to your deployments to only Vercelusers with suitable access rights. Vercel Authentication is available on all plans

  • Password Protection: Restricts access to your deployments to only users with the correct password. Password Protection is available on the Enterprise plan, or as a paid add-on for Pro plans

  • Trusted IPs: Restricts access to your deployments to only users with the correct IP address. Trusted IPs is available on the Enterprise plan.

Feature
Vercel
App Services
Plan Availability (on Vercel)
Restrict access to platform users
All plans
Password protection
🚫
For purchase on Pro, included in Enterprise
Trusted IPs
Enterprise plan

Back

Migrate to Netlify