How does "What is my IP" work?

Every request your browser sends carries your IP address as its return address, so the server knows where to send the HTML, graphics, and other elements of the webpage. The "What is my IP" page takes this address and displays it to you.

IP Addr.es runs behind Cloudflare, so the connection our server sees comes from Cloudflare. Cloudflare passes your address along in a header, and our web server puts it back where PHP expects it, so the code below shows your address, not Cloudflare's.

Our website uses PHP, a dynamic scripting language that powers thousands of websites across the internet. In PHP you can get the visitor's IP address with this snippet of code:

/* This code is public domain */
/* Source: https://ipaddr.es */

// Save the IP to a variable
$ip_address = $_SERVER['REMOTE_ADDR'];

// To display the IP:
echo $ip_address;

Last updated: September 29, 2026 (12:40 AM GMT)