Next.js + next-intl middleware not setting Link headers on Netlify

Hi,

I’m deploying a Next.js app on Netlify that uses next-intl for internationalization. This library relies on Next.js middleware to set a Link response header for alternate links. However, after deploying to Netlify, this header is missing from the response headers.

I tested the same app on Vercel, where the header is correctly included. I also deployed it on AWS using SST (which leverages OpenNext), and the header is present there as well.

It seems this issue is specific to Netlify.

Here are the deployed versions:

Any insights on why this might be happening on Netlify? Thanks in advance!

Could you share a minimal reproduction as a basic git repo?

Sure, you can use the official next-intl minimal example: next-intl/examples/example-app-router at main · amannn/next-intl · GitHub

As a new test, I’ve deployed it to Netlify and it also doesn’t set the Link headers. It does on Vercel.
Netlify: next-intl example
Vercel: next-intl example

Example site: next-intl example

I’m seeing the header:

You see the Link header if you access the URL without the locale (https://f-140739.netlify.app). If you access the page with the locale you don’t see the Link headers ( (next-intl example).

From what I see on my tests, your screenshot is from the 307 redirect request, not from the 200 response after redirect.

On others host, AWS and Vercel, the Link header is sent to URLs ending with the locale.

I see the issue. Thank you! I have passed this to the devs.