[Linux – dig] How to find the IP address of a domain name with dig in 2020 – Simple and easy!

Often times when updating DNS records for a website or setting up a new domain name you need to confirm the IP address your domain name resolves to. This is primarily done from a terminal or command prompt. On the Mac or Linux the recommended method is to use a program called dig. Dig stand for ‘Domain Information Groper’ and has been around since the dark ages of Linux computing.

Anyway, to jump right in here’s an example of finding the IP address of Google.com, you can replace google.com with your own domain name. In this example I am also using an optional argument of ‘+short’ which tells dig that I only want to see the answer to my question.

To find and only see the IP address of google.com you can use this command:

dig google.com +short

If you see no answer for your domain name then it’s likely that you have just updated a DNS record and it’ll take some time to propagate your record to other name servers or the name servers you’re using weren’t able to find your domain name.

Here’s an example of the command in use:

Should you have any questions or concerns about this please let me know by sending a private message using the contact page or leaving a comment below.

Happy clicking!

Leave a Reply

You are currently viewing [Linux – dig] How to find the IP address of a domain name with dig in 2020 – Simple and easy!