Search code examples
http-redirectip-address

What will be the IP address of a request during a URL redirect?


I have a page on my website with a button that clicks into another page on the same website. This page on-load redirects to an external URL.

What will be the IP address that the external site will see when the redirect happens? Will it be my website's IP, or will it be the user's IP?


Solution

  • It will be the client's (AKA user's) IP address that the external website will log. However, since you're redirecting from your website, they will also receive a Referer header header; which will point to your website's address.

    The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.