Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to inspect TXT records for my domain, such as SPF records. I tried the following command with nslookup but it didn't list the TXT records:

nslookup -type=TXT example.com

What is the correct command, or is there a better tool use on Windows 7?

share|improve this question
The command above works but villagevines.com has no TXT records however www.villagevines.com does. –  Iain Aug 24 '10 at 20:38
Please see answer by WilfriedVS, which works as a charm –  lucaferrario Apr 29 at 8:49

4 Answers 4

up vote 4 down vote accepted

Download BIND for Windows, there is a Windows port of dig in that. You should use dig instead of nslookup.

If you're a Powershell fan (like me) you can also download the Powershell Dig Cmdlet which should get TXT records for you directly within powershell. Good stuff.

PS> Get-Dns -Name mydomain.com -Type TXT
share|improve this answer

First start nslookup without parameters, then type set type=txt, then type the domain name.

nslookup <enter>
set type=txt <enter>



Default Server:  mydnsserver

> set type=txt

> villagevines.com

Server:  mydnsserver


*** No text (TXT) records available for villagevines.com

share|improve this answer
This is the real answer to the question and should be marked as such! –  lucaferrario Apr 29 at 8:48

I have no ideea why but if you add an IP of a nameser at the end it will work.
I have added google's dns name in this case:

nslookup -type=TXT villagevines.com

It can be your local DNS service.

HTH next time when you need to query your TXT records.

share|improve this answer

The link for Get-Dns does not work, the standard Powershell cmdlet to do this is

PS> Resolve-DnsName villagevines.com -Type TXT

See more on Resolve-DnsName

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.