The best way to build and host a free static website in 2023
Last updated:By Audeos on
I'm building a static generated Next.js app hosted on GitHub pages. It's fast!
Hello world. Next.js is awesome! I'm building a new website and gave myself a few challenges/requirements.
- No or low cost
- Performant
- Dynamic content
- Scalable
- Uses modern tooling
- Easy CI/CD
After doing some research this is what I came up with:
Recipe:
- Framework: Next.js
- Hosting: Github Pages (free)
- CI/CD: Build and Deploy Next.js App to GitHub Pages (free with GitHub Actions)
- CMS by Contentful (free tier)
- DNS by AWS Route 53
It is virtually free to host minus the cost of the domain name. Being a static site it is also very performant. Using Create Next App made setting up dev and build environment easy af.
In order to get free hosting on GitHub Pages the codebase repository must be open source. 👀 Check out my source code!