DEV Community

Cover image for How to host your Next14 app on Netlify in 2 minutes
Code With Joseph
Code With Joseph

Posted on

How to host your Next14 app on Netlify in 2 minutes

To follow this tutorial, you need to create a Netlify account and sign in to it, also the code for your Next app should be hosted on an online repository. I’m using GitHub to host the code.

Image description


Add a new site🔗:

You will be taken to your Netlify dashboard after you log in. After you click on the add new site button. It will bring up a popup menu, choose the 'import an existing project' option.

Image description


Choose your code repository platform👨‍💻:

Click on the platform of your choice and grant Netlify access to it. I'll choose GitHub because I'm using it to host my code.

Image description


Pick the repository of your Next.js app👩🏻‍💻:

After choosing a platform, Netlify will show you a list of repositories hosted on your platform. Pick the repository that contains the Next14 app.

Image description


Choose the correct branch & build settings⚙️:

Netlify automatically infers if you're using Next.js, the build settings will allow your app to run normally, but you'll also be able to customize your site name, build command, the base directory, and your publish directory here. This is where you can also add your environment variables. If you're using a different branch other than the default main branch, you can switch to it with the select menu. Once you're done, click on deploy 'site name' at the bottom.

Image description


You Next14 app is now live⚡

Your site is live! If there were no build errors, all you have to do is wait for Netlify to deploy your site. Once it's done deploying, it'll provide a domain name for you that you can use to visit your site. You might need to reload the page if you're being shown 'site in progress' for a long time.

Image description


Happy Coding!
You can hear more from me on:
𝕏 - https://x.com/code_withjoseph

Top comments (0)