Middleware Issues in Vercel Deployment: Multiple Requests for All Pages
Unanswered
Andalusian Hound posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Andalusian HoundOP
In the project I deployed on Vercel, my Next.js version is 14^. When I build and test it locally, the middleware works correctly. However, when I check the Vercel runtime logs, I see that when a user is redirected to a page, requests are made for all pages. What could be causing this, and how can I resolve it? Thank you in advance.
2 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Andalusian HoundOP
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Southern yellowjacket
Did you find an answer to your question? I am currently seeing the same behaviour. I think it has something to do with the Link component. The Link component prefetches the page when the link enters the user's viewport (initially or through scroll). Next.js prefetches loads the linked route and its data in the background to improve the performance of client side navigations. Prefetching is only enabled on production. I think this is why we see the middleware being called for so many pages in the logs.