====== DNS NSLookup ======
This is a Windows tool.
Remember, nslookup uses DNS suffix searches first and so may get timeouts. DIG is better. Use a . at the end of the query (e.g. ''google.com.'') to force the ignoring of DNS suffix search.
To lookup TXT Records
nslookup -q=TXT tester.jbstafford.co.uk 8.8.8.8
nslookup -type=TXT tester.jbstafford.co.uk 8.8.8.8
===== Different Server =====
Query a different DNS server than the one specified in Windows
nslookup www.google.com 1.1.1.1
===== Other =====
Query a different DNS server than the one specified in Windows
nslookup
> set norecurse
>www.google.com
==== Different Port ====
In theory, you can use "set port=5353" to tell nslookup to query port 5353 instead of port 53. However, this documented feature is broken in Windows and doesn't work. Use dig instead.
===== TTL =====
To find the TTL of a DNS record, use
nslookup -debug www.example.com
You will see TTL in there and possibly Default TTL
===== Debug =====
set debug
set nodebug
===== End Dot =====
When you don't put a ''.'' at the end of the query, Microsoft will test "domain"."DNS Suffix". If you do put a ''.'' at the end, Microsoft will only query what you type.
e.g. if you are connected to a network that hands out ''example.com'' as the DNS Suffix and you lookup ''www.google.com'', then the first DNS lookup is for ''www.google.com.example.com.'' However, if you lookup ''www.google.com.'' (note the ''.'' on the far right) then it will only lookup ''www.google.com''.