[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Request "ip" property is undefined, even deployed on Vercel

151 views · 0 likes · 3 posts


Nicholas (@nic13gamer) · 2024-08-22

Even with the project deployed to Vercel, the "ip" property on the NextRequest request object in a Route Handler is undefined. I have a deployed website to prove this.

Website route: https://vercel-req-ip-test.vercel.app/api/ip

This page returns your ip by the request.ip and from the headers.

Source code: https://github.com/Nic13Gamer/vercel-req-ip-test


Pauline P. Narvas (@pawlean) · 2024-08-27

Hi, @nic13gamer!

I found this old GitHub Discussions thread with a solution, does this work for you?

https://github.com/vercel/next.js/discussions/33435


Nicholas (@nic13gamer) · 2024-08-27

Hey!

The headers do give the IP information, however using `request.ip` is more secure right?

The docs say `request.ip` should be provided on deployments on Vercel, but this is not happening to me.

Thank you!