When I query a whois server with something like google.com, I get a whole slew of unrelated results, including things like GOOGLE.COM.SPAMMING.IS.UNETHICAL.PLEASE.STOP.THEM.HUAXUEERBAN.COM. Here I'm doing it manually with netcat, but you get similar results using whois:$ echo google.com | nc whois.internic.net 43Whois Server Version 2.0Domain names in the .com and .net domains can now be registeredwith many different competing registrars. Go to http://www.internic.netfor detailed information.Aborting search 50 records found .....GOOGLE.COM.AFRICANBATS.ORGGOOGLE.COM.ANGRYPIRATES.COMGOOGLE.COM.ARGOOGLE.COM.AUGOOGLE.COM.BAISAD.COMGOOGLE.COM.BEYONDWHOIS.COMGOOGLE.COM.BRGOOGLE.COM.CNGOOGLE.COM.COGOOGLE.COM.DOGOOGLE.COM.FORSALEGOOGLE.COM.HACKED.BY.JAPTRON.ESGOOGLE.COM.HANNAHJESSICA.COMGOOGLE.COM.HAS.LESS.FREE.PORN.IN.ITS.SEARCH.ENGINE.THAN.SECZY.COMGOOGLE.COM.HKGOOGLE.COM.HOUDA.DO.YOU.WANT.TO.MARRY.ME.JEN.REGOOGLE.COM.IS.APPROVED.BY.NUMEA.COMGOOGLE.COM.IS.NOT.HOSTED.BY.ACTIVEDOMAINDNS.NETGOOGLE.COM.LASERPIPE.COM.DOMAINPENDINGDELETE.COMGOOGLE.COM.LOLOLOLOLOL.SHTHEAD.COMGOOGLE.COM.MXGOOGLE.COM.MYGOOGLE.COM.NS1.CHALESHGAR.COMGOOGLE.COM.NS2.CHALESHGAR.COMGOOGLE.COM.PEGOOGLE.COM.PKGOOGLE.COM.SAGOOGLE.COM.SHQIPERIA.COMGOOGLE.COM.SOUTHBEACHNEEDLEARTISTRY.COMGOOGLE.COM.SPAMMING.IS.UNETHICAL.PLEASE.STOP.THEM.HUAXUEERBAN.COMGOOGLE.COM.SPROSIUYANDEKSA.RUGOOGLE.COM.SUCKS.FIND.CRACKZ.WITH.SEARCH.GULLI.COMGOOGLE.COM.TESTZZZZ.3000-RI.COMGOOGLE.COM.TRGOOGLE.COM.TWGOOGLE.COM.UAGOOGLE.COM.UKGOOGLE.COM.UYGOOGLE.COM.VABDAYOFF.COMGOOGLE.COM.VNGOOGLE.COM.WORDT.DOOR.VEEL.WHTERS.GEBRUIKT.SERVERTJE.NETGOOGLE.COM.YUCEHOCA.COMGOOGLE.COM.YUCEKIRBAC.COMGOOGLE.COM.ZNAET.PRODOMEN.COMGOOGLE.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COMGOOGLE.COM.ZZZZZZZZZZZZZ.GET.ONE.MILLION.DOLLARS.AT.WWW.UNIMUNDI.COMGOOGLE.COM.ZZZZZZZZZZZZZZZZZZZZ.LOLLERSKATES.RENDRAG.NETGOOGLE.COM.ZZZZZZZZZZZZZZZZZZZZZZZZZZ.HAVENDATA.COMGOOGLE.COMICTOWEL.COMGOOGLE.COMHow do I only get the whois data for the exact domain google.com?
How do I only get whois data for an exact domain?
netcat;whois
I found it, but the solution may vary from whois server to whois server.For whois.internic.net, use the keyword domain in your query:Often, the search finds more records than just the one wanted.  Specify   both type and full name to look up a specific record (for example,   domain ibm.com).So, either of these commands should work:$ echo domain google.com | nc whois.internic.net 43$ whois domain google.com -h whois.internic.netIf that command does not work, query the whois server with either ? or HELP in order to get details about the allowed commands:$ echo ? | nc whois.internic.net 43