Checking your IP addresses...

Your IP address towards a dual stack web server: checking...
Your IP address towards an IPv4-only web server: checking...
Your IP address towards an IPv6-only web server: checking...

(These are the addresses as seen by the web server, so they could be the addresses of a Network Address Translator (NAT) or proxy.)

Have a look at the HTML source and javascript used by this page

What the javascript does is connect to dual stack, IPv4 and IPv6 URLs respectively, where the server returns the IP address of the other side. That IP address is then written into the HTML element with the name test-ds, test-ipv4 or test-ipv6, respectively. If the connection to the server can't be made or times out, the message that there is no dual stack / IPv4 / IPv6 connectivity is written to the HTML element.

You can take the javascript and use it on your own website. Change the "delay=0" part to 2 seconds to simulate a timeout when testing.

You may link to the ip.php script for sites/pages that generate less than about 1000 hits per day. If you have more traffic than that, please set up your own script that returns the IP address and make it available over dual stack / IPv4 / IPv6 URLs.

The server side ip.php script that I use is in PHP:


header("Access-Control-Allow-Origin: *");
header("Cache-Control: no-store");

$delay = intval($_GET[delay]);

if ($delay > 0)

switch ($_SERVER[HTTP_HOST])
    case "":
    case "":
    case "": echo "$_SERVER[REMOTE_ADDR]"; break;
    default:                       echo "invalid HTTP hostname";