Too many redirects error when visiting link with query parameter

After deploying my Nuxt 3 application to production, it seems that the server can’t handle query parameters in the url. If the url has a query param, the server tries to redirect many times, resulting in a ERR_TOO_MANY_REDIRECTS error in the browser. This happens on all urls with query params on production, but does not happen on my local environment!

I tried looking in to the “_redirects” file (which is empty in my codebase). I can see that this file gets modified during deploy by “Nitro” and adds the following line of code:

/* /.netlify/functions/server 200

I suspect that this line of code in the “_redirects” file causes the problem. When visiting the url in the file, it says:

Page not found:

I tried adding this server file, but that didn’t fix it.

Could someone help me with this? Thanks in advance.

Hi there, glad you found us before we can help you, we need a little more information on the issues you are facing.

First, have you looked through this resource? It is a compilation of all of our build and deploy resources. This is a good starting point.

If you have worked through those guides and are still encountering issues please share the following information:

  • the name of your build instance: “
  • what you have already tried
  • any error messages you have received in your terminal window or in the developer console