FREQUENTLY ASKED QUESTIONS

Covering the major areas in Website Design, Mobile Apps Development, SEO and eCommerce solutions

DNS

X

How do I find out the nameservers of a domain name using nslookup or dig commands ?

To find out the nameservers of a domain name using the `nslookup` or `dig` commands, follow these steps:

### Using nslookup:

1. **Open Command Prompt or Terminal:**

   - On your computer, open the Command Prompt (Windows) or Terminal (macOS/Linux).

2. **Launch nslookup:**

   - Type `nslookup` and press Enter. This will launch the nslookup command-line tool.

3. **Set Query Type to NS:**

   - To specifically request nameserver records, set the query type to NS by typing:

   set type=NS

4. **Query the Domain:**

   - Type the domain name you want to find the nameservers for. For example, to find the nameservers for example.com:

  example.com

5. **View Nameserver Information:**

   - The nslookup tool will display the nameservers associated with the domain.

### Using dig:

1. **Open Command Prompt or Terminal:**

   - Open the Command Prompt (Windows) or Terminal (macOS/Linux).

2. **Use the dig Command:**

   - To find the nameservers of a domain, use the following dig command:

  dig NS example.com

   - Replace `example.com` with the domain name you're interested in.

3. **View Nameserver Information:**

   - The dig tool will provide a detailed output, including the nameservers associated with the domain.

### Interpretation:

In both cases, you'll receive a list of nameserver records associated with the domain. Each record typically includes the nameserver's hostname and its corresponding IP address.

For example:

example.com. IN  NS  ns1.example.com.

example.com. IN  NS  ns2.example.com.

In this example, the domain `example.com` is associated with two nameservers: `ns1.example.com` and `ns2.example.com`.

Keep in mind that DNS records are subject to caching, so changes to nameservers may not be immediately reflected across the entire internet. It's also possible that some authoritative servers may not respond to your query, depending on their configuration.

phn.png