> For the complete documentation index, see [llms.txt](https://docs.glesys.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glesys.com/products/connectivity/domains-and-dns/how-tos/troubleshoot-and-test-dns-lookups.md).

# Troubleshoot and test DNS lookups

***

To test specific records in Glesys DNS, you can use the `nslookup` tool, which is available on Linux, macOS, and Microsoft Windows.

When starting the tool, you first set the DNS server to one of Glesys's DNS servers. This ensures that the data you query is fresh and not cached by another DNS server. You specify the server using the `server` keyword.

If you want to test whether the DNS works end-to-end (i.e., that DNS servers on the internet are resolving queries to Glesys's DNS servers for your domain), you set the server to, for example, Google's DNS.

You change the record type using `set type=TYPE`.

First, start the `nslookup` tool:

{% code title="Command" %}

```
nslookup
```

{% endcode %}

Now you can enter commands and look up hostnames at the `>` prompt.

<pre data-title="Example nslookup session. Commands are highlighted."><code><strong>> server ns1.namesystem.se
</strong>Default server: ns1.namesystem.se
Address: 195.238.76.18#53
Default server: ns1.namesystem.se
Address: 2a02:750:aaaa::1#53
<strong>> set type=A
</strong><strong>> example.com
</strong>Server:         ns1.namesystem.se
Address:        195.238.76.18#53

Name:   example.com
Address: 203.0.113.99
<strong>> exit
</strong></code></pre>

To look up the MX records for the domain *example.com*, use `set type=MX`. First, let's start `nslookup` again.

{% code title="Command" %}

```
nslookup
```

{% endcode %}

<pre data-title="Example nslookup session. Commands are highlighted."><code><strong>> server ns1.namesystem.se
</strong>Default server: ns1.namesystem.se
Address: 195.238.76.18#53
Default server: ns1.namesystem.se
Address: 2a02:750:aaaa::1#53
<strong>> set type=MX
</strong><strong>> example.com
</strong>Server:         ns1.namesystem.se
Address:        195.238.76.18#53

example.com  mail exchanger = 10 mx01.glesys.se.
example.com  mail exchanger = 10 mx02.glesys.se.
<strong>> exit
</strong></code></pre>

## Performing lookups from an external DNS

Here, we perform a lookup using Google's DNS. If everything is configured correctly, Google's DNS should query Glesys DNS for the information.

Start the `nslookup` tool again:

{% code title="Command" %}

```terminal
nslookup
```

{% endcode %}

<pre class="language-terminal" data-title="Example nslookup session. Commands are highlighted."><code class="lang-terminal"><strong>> server 8.8.8.8
</strong>Default server: 8.8.8.8
Address: 8.8.8.8#53
<strong>> set type=A
</strong><strong>> example.com
</strong>Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   example.com
Address: 203.0.113.99
</code></pre>

If it doesn’t work, try querying the NS records to check if they point to Glesys DNS servers.

<pre class="language-terminal" data-title="Example nslookup session. Commands are highlighted."><code class="lang-terminal"><strong>> server 8.8.8.8
</strong>Default server: 8.8.8.8
Address: 8.8.8.8#53
<strong>> set type=NS
</strong><strong>> example.com
</strong>Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
example.com  nameserver = ns3.namesystem.se.
example.com  nameserver = ns2.namesystem.se.
example.com  nameserver = ns1.namesystem.se.

Authoritative answers can be found from:
<strong>> exit
</strong></code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.glesys.com/products/connectivity/domains-and-dns/how-tos/troubleshoot-and-test-dns-lookups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
