What is My External IP all about?

Every device connected to a network which uses the Internet Protocol has an unique IP address assigned to it. The global pool of such interconnected networks is known the internet.

Sometimes, when looking at it from the outside of the network, the IP address of a device seems to be different from the one assigned in the original (sub)network. This is due some mechanisms such as NAT.

My External IP displays the IP address of the device as it seems from the outside (hence external).

News / New Features

2014-08-26 Flattr and throttle

Flattr: I created a flattr-account and start accepting donations (small, big, does not matter). If you want to donate by other means: contact me.

Throttle: some folks out there have either running curl in a while-loop or a crazy understanding of how often their external ip changes or they need some tool to help keeping a line busy. Whatever the case might be: 20+ requests / second is way too often and thus I decided to throttle the answer a little bit. The good folks among you won't hardly notice it at all, the .. strange .. folks might.

2014-03-11 Introducing access rate

Usually this service runs very low profile and without much handholding. Recently I watched at the load and then on some logs and on some more logs and on some tcpdumps: One machine out there wanted to know it's IP at the rate of ~ 100 times a second. Heart-warming. Especially when the IP does not change at all. And especially when the user agent looks like "/tmp/.botc3 / 82d7f55ef6a49ab4e49d89caa5ea10ba"

So, the new access rate for everyone is around 1/s.

And you, young fella at 118.175.31.x ... you are banned! :)

2013-09-29 activated IPv6

'My External IP' can be reached via IPv6 now as well.

With IPv6 the whole NATting is kind of pointless and most devices will have a 'real' IP address with IPv6 but you still can use myexternalip.com to check if your network works as expected.

Looks like you are using IPv4.

2013-08-16 added 'My-External-Ip' header

Whenever you HEAD http://www.myexternalip.com, you will find your IP will be there (hint: in the 'my-external-ip' header)!

Checkout some of the examples on how to make use of that feature

How to use My External IP

So, how to use this site in your environment (other than just surfing it with a browser)? Here is a list of ideas to get you started:


to quote from the homepage of 'curl':

curl is a command line tool for transferring data with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTMP and RTSP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks.
$> curl http://www.myexternalip.com/raw

CURL, HEAD method

> curl -I http://www.myexternalip.com/raw


to quote from the homepage of 'wget':

GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.
$> wget -q -O - http://www.myexternalip.com/raw


often cited as the "Swiss Army Knife for TCP/IP" you can use netcat to obtain your external ip. this approach also works with netcat-alikes such as socat or even with telnet:

$> echo -ne "GET /raw HTTP/1.1\r\n\r\n" | \
    nc www.myexternalip.com 80


just like the regular netcat version, just ask the server to deliver just the HEAD-information

$> echo -ne "HEAD / HTTP/1.1\r\n\r\n" | \
    nc www.myexternalip.com 80


BITS stands for "Background Intelligent Transfer Service", it is a builtin tool of the Windows OS.

$> bitsadmin /transfer "myip" http://www.myexternalip.com/raw %TEMP%\myip.txt
$> type %TEMP%\myip.txt


Powershell is the replacement for the 'old' cmd.exe, it is a builtin of the Windows OS since Windows7 and Windows Server 2008 R2. It is also available as an additional feature for WindowsXP, WindowsVista and Windows Server.

$> $wc = new-object System.Net.WebClient
$> $wc.DownloadString("http://www.myexternalip.com/raw")


package main

import ( "io"; "net/http"; "os" )

func main() {
    resp, err := http.Get("http://www.myexternalip.com/raw")
    if err != nil {
    defer resp.Body.Close()
    io.Copy(os.Stdout, resp.Body)

Python One-Liner

$> python -c "import urllib; \
    print urllib.urlopen('http://www.myexternalip.com/raw').read()"


import urllib
ip = urllib.urlopen('http://www.myexternalip.com/raw').read()

print ip

Python with 'request'

import requests
r = requests.get('http://www.myexternalip.com/raw')
ip = r.text

Python with 'request', HEAD method

import requests
r = requests.head('http://www.myexternalip.com')
ip = r.headers['my-external-ip']

Ruby One-Liner

$> ruby -e 'require "net/http"; \
    Net::HTTP.get_print("http://www.myexternalip.com", "/raw")'


require 'net/http'
ip = Net::HTTP.get('http://www.myexternalip.com', '/raw')

print ip

Perl One-Liner

$> perl -e 'use LWP::Simple; \
    print (get "http://www.myexternalip.com/raw");'


use LWP::Simple;
$ip = (get "http://www.myexternalip.com/raw");

print $ip;


open FSharp.Data

printfn "%s" (Http.RequestString("http://www.myexternalip.com/raw"))


$> php -r 'echo file_get_contents("http://myexternalip.com/raw");'


If you wish to contact us, please mail to webmaster@myexternalip.com.