Client WHOIS Lookup

Client WHOIS Lookup

Developed By Rad Web Hosting

Compatible with WHMCS v9.0

Client WHOIS Lookup (WHMCS Addon Module)

A secure, public-facing WHOIS lookup module for WHMCS that allows visitors or clients to perform WHOIS queries while maintaining performance, abuse protection, and administrative control.

This module provides:

  • Public WHOIS lookup interface
  • Strict domain validation (<second-level-domain>.<top-level-domain>)
  • Configurable list of allowed TLDs
  • WHOIS server overrides per TLD
  • Automatic IANA WHOIS referral fallback
  • Filesystem-based WHOIS caching
  • Built-in WHMCS CAPTCHA protection for anonymous users
  • Admin interface for managing WHOIS servers
  • IDN / Punycode support
  • Zero external dependencies

Features

Public WHOIS Lookup

The module creates a publicly accessible WHOIS lookup page:

https://yourwhmcs.com/index.php?m=client_whois

Visitors can search domains in the format:

example.com
example.net
example.org

The module strictly enforces the format:

<second-level-domain>.<top-level-domain>

Subdomains are not allowed.

Example of valid input:

example.com
test.org
mydomain.xyz

Invalid inputs:

example.com.au
test.example.com
http://example.com

CAPTCHA Protection

Anonymous visitors must pass WHMCS CAPTCHA verification before a WHOIS lookup is executed.

CAPTCHA is automatically integrated with WHMCS security settings.

Supported CAPTCHA providers include:

  • reCAPTCHA
  • hCaptcha
  • Cloudflare Turnstile
  • WHMCS internal CAPTCHA

Logged-in users do not see CAPTCHA.

Configure CAPTCHA in:

WHMCS Admin → System Settings → Security → CAPTCHA

WHOIS Server Resolution

The module resolves WHOIS servers in the following order:

  1. Admin-defined WHOIS server (database)
  2. Static fallback mapping
  3. IANA referral lookup

Example resolution flow:

example.com
→ check admin override
→ fallback to static map
→ fallback to IANA whois.iana.org
→ follow referral server

This ensures maximum compatibility across TLD registries.

WHOIS Caching

To improve performance and prevent abuse, WHOIS responses are cached locally.

Cache behavior:

Property Value Storage Filesystem Cache key SHA1(domain) Default TTL 3600 seconds Directory /modules/addons/client_whois/cache/

Example cache file:

cache/whois_9f86d081884c7d659a2feaa0c55ad015.txt

When cache exists and has not expired:

  • No outbound WHOIS connection is made
  • Cached response is returned instantly

Admin WHOIS Server Management

The module provides a database-backed admin interface allowing custom WHOIS servers to be defined per TLD.

Admin page:

WHMCS Admin → Addons → Client WHOIS Lookup

You can:

  • Add WHOIS servers
  • Edit existing servers
  • Disable servers
  • Delete entries

Database table:

mod_client_whois_servers

Schema:

Column Description id Primary key tld TLD without leading dot server WHOIS hostname port WHOIS port (default 43) active Enable / disable created_at Timestamp updated_at Timestamp

Example entry:

tld: com
server: whois.verisign-grs.com
port: 43
active: 1

Allowed TLD Configuration

The module validates TLDs using a configurable list.

File:

/modules/addons/client_whois/config/tlds.php

Example:

return [
    ".com",
    ".net",
    ".org",
    ".xyz",
];

If the module setting Allow Non-Listed TLDs is disabled, the domain must use one of these TLDs.

File Structure

modules/addons/client_whois/
│
├── client_whois.php
├── README.md
│
├── config/
│   └── tlds.php
│
├── lib/
│   ├── WhoisClient.php
│   └── WhoisServers.php
│
├── templates/
│   ├── clientarea.tpl
│   └── style.css
│
└── cache/

Installation

  1. Upload the module directory:
/modules/addons/client_whois/
  1. Ensure cache directory exists:
/modules/addons/client_whois/cache/

Set permissions:

chmod 755 cache
  1. Login to WHMCS Admin.

  2. Navigate to:

System Settings → Addon Modules
  1. Activate Client WHOIS Lookup

  2. Configure module settings.

Module Settings

Setting Description Page Title Title shown on the lookup page WHOIS Timeout Socket timeout for WHOIS requests Max Bytes Maximum WHOIS response size Cache TTL Cache expiration time Allow Non-Listed TLDs Disable strict TLD validation

Accessing the WHOIS Page

The module is publicly available at:

index.php?m=client_whois

Example:

https://yourwhmcs.com/index.php?m=client_whois

Domain Validation Rules

The module validates:

  • Exactly one dot in the domain
  • SLD length 1–63 characters
  • Only characters allowed in SLD:
a-z
0-9
-

Hyphens cannot appear at the start or end.

Examples:

Valid:

example.com
my-domain.net
test123.org

Invalid:

-example.com
example-.net
test..org

Security Features

The module includes several abuse protections:

CAPTCHA Protection

Anonymous users must pass CAPTCHA before lookup.

Strict Domain Validation

Prevents injection attempts.

Output Size Limits

WHOIS responses are truncated if they exceed configured limits.

Timeout Protection

Socket connections automatically close after timeout.

Cached Responses

Reduces repeated WHOIS requests.

Performance Characteristics

Typical response times:

Scenario Time Cache hit < 5 ms Cached WHOIS < 20 ms Live WHOIS 200–900 ms

Cache dramatically improves performance under load.

IDN / International Domain Support

The module supports:

  • Unicode domains
  • Punycode conversion
  • IDNA (UTS#46)

Example:

m&uuml;nchen.de
xn--mnchen-3ya.de

Troubleshooting

"WHOIS lookup failed"

Check firewall rules allowing outbound port 43.

Example:

iptables -A OUTPUT -p tcp --dport 43 -j ACCEPT

Cache not writing

Ensure permissions:

chmod 755 cache

or

chown www-data cache

CAPTCHA not showing

Verify CAPTCHA is enabled in:

WHMCS &rarr; Security Settings

Optional Enhancements

The module architecture supports future extensions such as:

  • IP rate limiting
  • Redis caching
  • WHOIS parsing
  • Domain availability checking
  • Registrar detection
  • Admin cache purge
  • WHOIS usage analytics

License

This module is provided for internal or commercial use within WHMCS environments.

Support

For issues or feature requests, review the module code or extend functionality using WHMCS addon development guidelines.

 

Reviews

5 stars
1
1
4 stars
0
0
3 stars
0
0
2 stars
0
0
1 star
0
0
Site Admin avatar

Site Admin @site2429

March 28, 2026 at 09:06:11 PM

Nice! I like the custom backend.

  • 14 hours ago

Version Compatibility


Compatible with WHMCS v9.0

Full Version Compatibility


  • Selected versions of WHMCS v9.0
        9.0.0 - 9.0.1
  • All versions of WHMCS v8.13
  • All versions of WHMCS v8.12
  • All versions of WHMCS v8.11
  • Selected versions of WHMCS v8.10
        8.10.0
  • Selected versions of WHMCS v8.9
        8.9.0
  • Selected versions of WHMCS v8.8
        8.8.0
  • All versions of WHMCS v8.7
  • All versions of WHMCS v8.6
  • All versions of WHMCS v8.5
  • All versions of WHMCS v8.4
  • All versions of WHMCS v8.3
  • All versions of WHMCS v8.2
  • All versions of WHMCS v8.1
  • All versions of WHMCS v8.0
  • All versions of WHMCS v7.10
  • All versions of WHMCS v7.9
  • All versions of WHMCS v7.8
  • All versions of WHMCS v7.7
  • All versions of WHMCS v7.6
  • All versions of WHMCS v7.5
  • All versions of WHMCS v7.4
  • Selected versions of WHMCS v7.3
        7.3.0
  • All versions of WHMCS v7.2
  • All versions of WHMCS v7.1
  • All versions of WHMCS v7.0
  • All versions of WHMCS v6.3
  • All versions of WHMCS v6.2
  • All versions of WHMCS v6.1
  • All versions of WHMCS v6.0
  • All versions of WHMCS v5.3

Support for this product

The best place to start if you need help with a specific product is to contact the developer. All WHMCS Marketplace developers have both a website and support URL listed.

Developed By Rad Web Hosting

Changelog

v1.1.0 Released March 3rd, 2026

Latest Version


Initial Release

 

See also

FREE ResellerClub Tools v2

Working comfortably with ResellerClub's products and services through your WHMCS system requires additional tools.

Free
SEO Manager

The module developed to add meta description and meta keywords and change the page title

Free
WHOIS for Clients

WHOIS for Clients

Free
Dropbox Backup for WHMCS

This module will integrate WHMCS with Dropbox to upload a copy of WHMCS database onto the cloud. You will never have to worry about losing data any more.

Free
Software Licensing Addon

Build, License & Distribute Your Own Apps using WHMCS

Commercial