# Terminal: Performing DNS lookup for a domain

## Question

How do I perform DNS lookup for a domain name?

## Answer

The *host* command reads the DNS and returns the A, AAAA and MX [records](https://openprovider.help/books/dns/page/dns-records) belonging to a name. This information is very useful at the start of a debugging session:

```
host yourdomain.tld
```

\* replace *yourdomain.tld* with your actual domain name.  
  
If the name is a redirect (CNAME) to another name, it will return the information for that other name. For example, www.openprovider.com is a redirect to openprovider.com:

```
host www.openprovider.com
```

If you want to see all record types, add the parameter *-a*:

```
host -a yourdomain.tld
```

\* replace *yourdomain.tld* with your actual domain name.