Project

docheck

0.0
No release in over 3 years
Low commit activity in last 3 years
Domain name availability checker.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.6.0

Runtime

= 3.6.5
 Project Readme

Docheck

Domain name availability checker. Docheck checks a name against generic TLDs and reports which domains are available and which are registered.

Docheck uses RDAP (RFC 9082/9083), the protocol that replaced WHOIS for gTLDs. It sends one HTTPS request per TLD to the registry’s RDAP server, all in parallel. It has no runtime dependencies.

Requirements

Ruby >= 3.2

Installation

$ gem install docheck

Usage

From the command line:

$ docheck -n google

The command exits with status 0 on success and 64 on a usage error or an invalid name.

From Ruby:

require "docheck"

results = Docheck.check("github")
results.first          # => #<data Docheck::Result domain="github.com", status=:registered>
results.select(&:available?).map(&:domain)

# Custom TLDs and deadline (seconds for the whole check)
checker = Docheck::Checker.new(tlds: %w[com net io], deadline: 5)
checker.check("github")

Each Docheck::Result has a status:

  • :available - the registry has no record of the domain

  • :registered - the registry has a record of the domain

  • :unknown - the lookup failed (timeout, rate limit, or server error)

  • :unsupported - the TLD has no RDAP server in the IANA bootstrap data

Docheck::Checker#check raises Docheck::InvalidNameError when the name is not a single DNS label (1-63 letters, digits, or hyphens). Pass IDNs in punycode (xn--...).

The 1.x API (Docheck::Application with fetch, available_domains, registered_domains, and print) still works.

Development

$ bundle install
$ bundle exec rake                 # tests and RuboCop
$ bundle exec rake rdap:update     # refresh data/rdap_dns.json from IANA

License

Copyright © 2010 - 2026 Kunto Aji Kristianto, Docheck is released under the MIT license.