1.\" $OpenBSD: whois.1,v 1.38 2023/08/21 11:12:28 jsg Exp $ 2.\" $NetBSD: whois.1,v 1.5 1995/08/31 21:51:32 jtc Exp $ 3.\" 4.\" Copyright (c) 1985, 1990, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. Neither the name of the University nor the names of its contributors 16.\" may be used to endorse or promote products derived from this software 17.\" without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" @(#)whois.1 8.2 (Berkeley) 6/20/94 32.\" 33.Dd $Mdocdate: August 21 2023 $ 34.Dt WHOIS 1 35.Os 36.Sh NAME 37.Nm whois 38.Nd Internet domain name and network number directory service 39.Sh SYNOPSIS 40.Nm whois 41.Op Fl AadgIilmPQRr 42.Oo 43.Fl c Ar country-code | Fl h Ar host 44.Oc 45.Op Fl p Ar port 46.Ar name ... 47.Sh DESCRIPTION 48The 49.Nm 50utility looks up records in the databases maintained by several 51Network Information Centers 52.Pq Tn NICs . 53.Pp 54The options are as follows: 55.Bl -tag -width Ds 56.It Fl A 57Use the Asia/Pacific Network Information Center 58.Pq Tn APNIC 59database. 60It contains network numbers used in East Asia, Australia, 61New Zealand, and the Pacific islands. 62.It Fl a 63Use the American Registry for Internet Numbers 64.Pq Tn ARIN 65database. 66It contains network numbers used in those parts of the world 67covered neither by 68.Tn AfriNIC , 69.Tn APNIC , 70.Tn LACNIC , 71nor by 72.Tn RIPE . 73.Pp 74(Hint: All point of contact handles in the 75.Tn ARIN 76whois database end with 77.Qq Li -ARIN . ) 78.It Fl c Ar country-code 79This is the equivalent of using the 80.Fl h 81option with an argument of 82.Qq Ar country-code Ns Li .whois-servers.net . 83.It Fl d 84Use the US Department of Defense database. 85It contains points of contact for subdomains of 86.Tn \&.MIL . 87.It Fl g 88Use the US non-military federal government database, which contains points of 89contact for subdomains of 90.Tn \&.GOV . 91.It Fl h Ar host 92Use the specified host instead of the default NIC 93(whois.crsnic.net). 94Either a host name or an IP address may be specified. 95.Pp 96By default 97.Nm 98constructs the name of a whois server to use from the top-level domain 99.Pq Tn TLD 100of the supplied (single) argument. 101For newer generic domains (gTLDs), a lookup for whois.nic.tld is attempted. 102For other TLDs, or if this lookup fails, 103.Qq Li .whois-servers.net 104is appended to the TLD. 105This effectively allows a suitable whois server to be selected 106automatically for a large number of 107.Tn TLDs . 108.Pp 109In the event that an IP 110address is specified, the whois server will default to the American 111Registry for Internet Numbers 112.Pq Tn ARIN . 113If a query to 114.Tn ARIN 115references 116.Tn APNIC , LACNIC , 117or 118.Tn RIPE , 119that server will be queried also, provided that the 120.Fl Q 121option is not specified. 122.Pp 123If the query is not a domain name or IP address, 124.Nm 125will fall back to 126.Pa whois.crsnic.net . 127.It Fl I 128Use the Internet Assigned Numbers Authority 129.Pq whois.iana.org 130root zone database. 131It contains information about top-level domains. 132.It Fl i 133Use the Network Solutions Registry for Internet Numbers 134.Pq Tn whois.networksolutions.com 135database. 136Historically, it contained network numbers and domain contact information 137for most of 138.Tn \&.COM , 139.Tn \&.NET , 140.Tn \&.ORG 141and 142.Tn \&.EDU 143domains. 144However, the registration of these domains is now done by a number of 145independent and competing registrars and this database holds no information 146on the domains registered by organizations other than Network Solutions, Inc. 147Also, note that the 148.Tn InterNIC 149database 150.Pq Pa whois.internic.net 151is no longer handled by Network Solutions, Inc. 152For details, see 153.Lk https://www.internic.net/ . 154.Pp 155(Hint: Contact information, identified by the term 156.Em handle , 157can be looked up by prefixing 158.Qq Li \&! 159or 160.Qq Li handle\ \& 161to the 162.Tn NIC 163handle in the query.) 164.It Fl l 165Use the Latin American and Caribbean IP address Regional Registry 166.Pq Tn LACNIC 167database. 168It contains network numbers used in much of Latin America and the 169Caribbean. 170.It Fl m 171Use the Route Arbiter Database 172.Pq Tn RADB 173database. 174It contains route policy specifications for a large 175number of operators' networks. 176.It Fl P 177Use the PeeringDB database of AS numbers. 178It contains details about presence at internet peering points 179for many network operators. 180.It Fl p Ar port 181Connect to the whois server on 182.Ar port . 183If this option is not specified, 184.Nm 185defaults to the 186.Dq whois 187port listed in 188.Pa /etc/services 189(port 43). 190.It Fl Q 191Do a quick lookup. 192This means that 193.Nm 194will not attempt to lookup the name in the authoritative whois 195server (if one is listed) nor will it contact InterNic if a lookup 196fails. 197This flag has no effect when combined with any other flag. 198.It Fl R 199Use the Russia Network Information Center 200.Pq Tn RIPN 201database. 202It contains network numbers and domain contact information 203for subdomains of 204.Tn \&.RU . 205This option is deprecated; use the 206.Fl c 207option with an argument of 208.Qq Li RU 209instead. 210.It Fl r 211Use the Reseaux IP Europeens 212.Pq Tn RIPE 213database. 214It contains network numbers and domain contact information for Europe. 215.El 216.Pp 217The default action, unless directed otherwise with a special 218.Ar name , 219is to do a very broad search, looking for matches to 220.Ar name 221in all types of records and most fields (name, nicknames, hostname, net 222address, etc.) in the database. 223For more information as to what 224.Ar name 225operands have special meaning, and how to guide the search, use 226the special name 227.Dq help . 228.Ss Special cases 229Queries beginning with an exclamation point 230.Ql \&! 231are assumed to be 232.Tn NSI 233contact handles. 234Unless a host or domain is specified on the command line, 235.Pq whois.networksolutions.com 236will be used as the 237.Nm 238database. 239.Pp 240Similarly, queries beginning with 241.Dq COCO- 242are assumed to be 243.Tn CORE 244contact handles. 245Unless a host or domain is specified on the command line, 246.Pq whois.corenic.net 247will be used as the 248.Nm 249database. 250.Sh EXAMPLES 251Most types of data, such as domain names and 252.Tn IP 253addresses, can be used as arguments to 254.Nm 255without any options, and 256.Nm 257will choose the correct whois server to query. 258Some exceptions, where 259.Nm 260will not be able to handle data correctly, are detailed below. 261.Pp 262To obtain contact information about an 263administrator located in the Russian 264.Tn TLD 265domain 266.Qq Li RU , 267use the 268.Fl c 269option as shown in the following example, where 270.Ar CONTACT-ID 271is substituted with the actual contact identifier. 272.Pp 273.Dl "whois -c RU CONTACT-ID" 274.Pp 275(Note: This example is specific to the 276.Tn TLD 277.Qq Li RU , 278but other 279.Tn TLDs 280can be queried by using a similar syntax.) 281.Pp 282The following example demonstrates how to query 283a whois server using a non-standard port, where 284.Dq Li query-data 285is the query to be sent to 286.Dq Li whois.example.com 287on port 288.Dq Li rwhois 289(written numerically as 4321). 290.Pp 291.Dl "whois -h whois.example.com -p rwhois query-data" 292.Sh STANDARDS 293.Rs 294.%A K. Harrenstien 295.%A M. Stahl 296.%A E. Feinler 297.%D October 1985 298.%R RFC 954 299.%T NICNAME/WHOIS 300.Re 301.Pp 302.Rs 303.%A L. Daigle 304.%D September 2004 305.%R RFC 3912 306.%T WHOIS Protocol Specification 307.Re 308.Sh HISTORY 309The 310.Nm 311command appeared in 312.Bx 4.1c . 313