DEV Community

Cover image for Beyond Vercel: Hosting Alternatives for Next
Thomas Desmond
Thomas Desmond

Posted on • Originally published at thetombomb.com

Beyond Vercel: Hosting Alternatives for Next

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

Netlify Logo

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.

Next.js with AWS Amplify

AWS Amplify Logo

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.

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.

💡 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

Azure Static Web Apps Logo

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.

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.

Top comments (2)

Collapse
 
fabiancdng profile image
Fabian Reinders • Edited

Hey Thomas, great article and good options 👏
My personal website and blog are built with Next.js and Storyblok and I just deployed everything on a cheap VPS 😅

Honestly, I think it's the best option for small websites and hobby projects as you have amazing control over your costs (almost no traffic limit, no need to pay for execution time on the edge, etc.) and even a very cheap VPS can scale a loong way. Especially, if it's somewhat commercial (or will be in the future) and you don't qualify for the free tier.

But not having a CDN out of the box is definitely a good point. Might look into Amplify or Vercel in the future but for now, self-hosting does it for me.

Collapse
 
thetombomb profile image
Thomas Desmond

Nice! I'm glad you were able to find a solution that works for you.