Reputation: 562
Hi I need to know the IP address of my website to give to my payment gateway. I know I can find an IP address by going to any of the websites which come up on google, but my understanding is that they give the domain's IP address which may be different from the IP address of the server the site is hosted on.
So how to I find out what the IP address of my server is?
Thanks :)
Upvotes: 0
Views: 1184
Reputation: 26
Run this from the command line to get your server's outgoing IP:
wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
Upvotes: 1
Reputation: 151604
What do you mean by the domain IP? The IP returned from a DNS lookup when querying your domain? This is most likely equal to the IP of your (shared) server, otherwise your website would be unreachable.
An exception to that is when the IP your DNS record represents belongs to a proxy server, which forwards the request to the real server.
You could always get the public IP address of the server by visiting www.whatismyip.com from the server.
Upvotes: 0
Reputation: 20475
you can also do a quick PHP output of
<?php
phpinfo();
?>
it will contain all the values you need for your host details (just don't leave this file public after you use it).
Upvotes: 0