Hacker News new | past | comments | ask | show | jobs | submit login
Multiple domains and languages on the same Next.js site (github.com/tomsoderlund)
59 points by tomsoderlund on April 10, 2021 | hide | past | favorite | 11 comments



I really wish next would just support multiple domains out of the box. I have two sites that share 99% of the same code but just need slightly different styles and endpoints.


That can be dealed with proper CI tooling. In your build script you can create one folder for each website, tweak it as needed and deploy each of them independently.

With Google Cloud Build you can even deploy them in parallel.


Yeah if been meaning to setup something like that. Was thinking a base docket image that has all the shared stuff and just mounting the different directories for each site to override. Just haven’t had time.


The biggest thing missing for i18n is `next export` support; that's the only way to get true SSR (static exports) for something like GitHub pages.

It's a shame they haven't addressed that in months despite lots of folks asking for it.


I ran into this (surprising) problem. Ended up having to shift my deployment from Netlify to Vercel itself to get around it.


Would this approach leak the other domains associated with the Next.js site?


languages refer to i18n and not programming languges


Funny because I thought it was programming langugages, as I have done that in the past.

You can mix any supported /api serverless functions runtime in your backend code.

I've done so with python and node for example.

Gotta love next


languages refer to i18n and not programming languages


For future reference, to delete a comment, tap/click the “x minutes ago” time and then tap/click “delete” at the top. However, after two hours or after a single reply, you can no longer delete the comment.


Please stop downvoting, I barely have any karma and I don't know how to delete this... I am aware that I posted the same comment twice accidentally.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: