https://hashnode.com it is very popular website for developers. It allows developers to publish blog on their own custom domain.
It uses next.js to generate static pages and it uses vercel to manage custom domains.
I am also developing a similar application with next.js where every on can get their website on their own domain. But i am confused how to generate millions of static pages with next.js and add a support for custom domain?
My Approach
- Deploy a next.js server for each client/domain
- Publish generated pages on cdn like
https://domain.mycompany.com/path/...
- How can i do so? Since, next.js doesn’t support that we can write the generated SSG/SSR pages on custom domain
- Publish generated pages on cdn like
My approach doesn’t seems good, so i am here asking from SO community to how can we implement such functionality with next.js.