Beyond Vercel: Hosting Alternatives for Next
Tags: webdev, nextjs, jamstack, javascript
Published: 2023-05-12 16:53:44

Next.js has gained significant popularity as a frontend framework. And rightly so. Next.js has a solid developer experience, lots of features, and is flexible enough to work for many use cases.  

And with Next.js comes Vercel, the maintainers of Next.js and the go-to platform for hosting your Next.js applications. You’d think since Vercel built Next.js and continues to add features wouldn’t Vercel be the best hosting solution? 

Yes, Vercel is a great choice, but it’s prudent to understand that there are other hosting options out there that go beyond Vercel. In this article, we will explore alternative hosting solutions for your Next.js app. You need to host your awesome application to show it to the world, so learn where that hosting makes the most sense for you.

For all the Sitecore Headless Services readers, the hosting options listed below can support your Next.js Headless Services built applications.

## Hosting Options

When choosing your hosting consider things like support for advanced Next.js features such as Incremental Static Regeneration (ISR), middleware, and serverless functions. Also, consider the developer experience, costs, and scalability.

Comparing options for an enterprise setting? Make sure you look into things like security compliance, single sign-on (SSO) integration, and dedicated customer support. 

The two standout alternatives are Netlify and Amazon Web Services (AWS) Amplify. The out-of-the-box support for Next.js features, built-in content delivery network (CDN), and other nice-to-haves of Netlify and AWS Amplify make them great choices. Microsoft’s Azure Static Web Apps is another choice; you can even self-host. Let’s jump into the hosting options.

## [Hosting Next.js on Netlify](https://www.netlify.com/with/nextjs/)

![Netlify Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j95bulblkfd80qimt7zq.png)

Netlify deserves its own category because it is the most similar to Vercel. Netlify is one of the most popular web hosting platforms, especially for Jamstack applications. Like Vercel, Netlify can host the most popular frontend frameworks, including Next.js, React, Angular, Nuxt, Vue, and more. 

Netlify has its own content delivery network (CDN), support for Next.js serverless functions, Incremental Static Regeneration (ISR), Middleware, Image Optimization, and more. The Netlify team works hard to provide a fully featured Next.js experience.

Netlify, in my opinion, is the closest and most worthy competitor to Vercel. For more information check out [Next.js on Netlify](https://www.netlify.com/with/nextjs/).

## [Next.js with AWS Amplify](https://docs.amplify.aws/guides/hosting/nextjs/q/platform/js/)

![AWS Amplify Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2eki5j4xd91nwglbmc35.png)

Maybe you want more control over your deployment workflow, want to stay in your existing cloud environment, need more granular control of your application, or some other reason. You may find yourself considering [AWS Amplify](https://aws.amazon.com/amplify/).

AWS Amplify provides a complete solution for hosting a globally distributed Next.js application. It supports all the biggest Next.js features, including SSR, API routes, middleware, ISR, and image optimization. Meaning less infrastructure setup and maintenance for you. The developer experience is not as seamless as Vercel or Netlify, but I see improvements being made.

Find their Next.js hosting tutorial here: [Deploy a Next.js 13 app to AWS with Amplify Hosting](https://aws.amazon.com/blogs/mobile/amplify-next-js-13/).

> 💡 Vercel, Netlify, and AWS Amplify are my recommendations for hosting Next.js. They all have purpose-built solutions for hosting globally distributed Next.js apps and support the best features of Next.js. 

### [Microsoft Azure Static Web Apps](https://azure.microsoft.com/en-us/products/app-service/static)

![Azure Static Web Apps Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cj22wkry8cd63n1x3499.png)

I know many people are in the Microsoft Cloud ecosystem, so I want to mention the Microsoft solution Azure Static Web Apps. 

You may have noticed Static Web Apps is not currently one of my recommended hosting platforms. It does not *currently* support many of Next.js’ more advanced features. There is a public preview available that claims support for zero-config setup, SSR, ISR, API Routes, Image optimization, and more. But I would not consider this public preview ready for production enterprise Next.js apps. 

Hopefully, in the future, when no longer in preview, I can add Azure Static Web Apps as a recommendation for Next.js hosting. For now, it’s better to hold off.

Here is a recent video detailing the public preview: [Enhanced Hybrid Next.js Support in Azure Static Web Apps](https://www.youtube.com/watch?v=68CFn-EkkNM).

## Dedicated Node.js Hosting & Self-Hosting Next.js

The last hosting option is dedicated Node.js Hosting and Self-Hosting. This is only for when you need complete control of your Next.js application and also want full responsibility for the maintenance. I stay very far away from this because I do not want to maintain my own CDN, I don’t want to deal with all the infrastructure, and I don’t want to set EVERYTHING up. 

The platforms you may use if you are in this category could be an AWS EC2 instance, Digital Ocean, Heroku, or, heck, it could be your own laptop. At its most basic, the workflow here is that you would run `next build` to generate the static HTML files. Then host them on the platform of your choice. 

Don’t make things harder for yourself than they need to be. Consider your top three options Vercel, Netlify, and AWS Amplify. 

## Conclusion

While Vercel is an exceptional choice for hosting Next.js applications, it's essential to recognize that alternative options are available to suit your specific needs and preferences. Determine what is most important to you and your situation, then choose what fits best.

Support for advanced Next.js features, developer experience, and not having to maintain a globally distributed infrastructure are most important to me. That’s why I have recommended Netlify and AWS Amplify as alternatives to Vercel. Choose any of the three, and you’ll have a fast, secure, and scalable Next.js app. Vercel, Netlify, and AWS Amplify can all support a Sitecore JSS at an enterprise scale. 

If you do choose one of these three or even something else, reach out to me and let me know why you made your decision.