A .NET WHOIS library written in C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Build @ 40bab95 Fixing Unit Tests Oct 23, 2014
Docs Refactoring + Adding Build Script Sep 15, 2014
Whois.Tests.Integration Build and Sample Updates Nov 2, 2014
Whois.Tests Build and Sample Updates Nov 2, 2014
Whois Build and Sample Updates Nov 2, 2014
.gitmodules Fix for Redirect Detection Oct 22, 2014
Nant-to-NuGet.build Adding IANA TLD lookup class and samples Oct 20, 2014
README.md Fix grammar mistake in readme Sep 5, 2017
Whois.Net20.sln Adding Contact Detail Extraction + .NET 2.0 Oct 7, 2014
Whois.nuspec Updating Console Application Oct 18, 2014



.NET WHOIS is a drop-in library that enables you to query WHOIS information for domain registrations in .NET projects. The library doesn't have any dependencies and returns an object representing the WHOIS data.


You can install the library via the NuGet GUI or by entering the following command into the Package Manager Console:

Install-Package Whois

The source code is available on Github and can be downloaded and compiled.


To use the library, reference it in your project and then use the following code:

using namespace Whois;
var whois = new WhoisLookup().Lookup("github.com");

How The Library Works

The library works by querying [CenterGate’s whois-servers.net] 1 in order to find the correct WHOIS server for the TLD. The TLD WHOIS server is then queried in order to get the WHOIS information for the domain. Queries to WHOIS servers are made using TCP.

Whois Query Flow Diagram


As WHOIS data is returned in free text format, custom Visitor classes need to be written to extract information and return it in a structured format. Currently only the registration date is returned for a number of registrars, however this can easily be extended by writing new visitors.

Further Reading

Further details about how the library works can be found on [this blog post] 2.