# Domain Whois Service

For some domain registrar modules which done have an API to get the domain availability, hostware uses the internal WhoisService which performs whois queries via CLI and matches the response against an availability pattern.

### Files

Directory: App\Framework\Core\Hosting\Domain\Whois\\\
\
**WhoisService.php**\
The logic for the whois requests. This usually must not be changed.

**whois-servers.json**\
A JSON file for each TLD with the availability pattern. This file must be changed when something is not working for a given TLD.

### Pattern

The response text is always different when a domain is given, but always the same when a domain is available.

Example: "The domain is not given"

### Debug a false-positive

When a domain availability status is wrong, you can debug it the following way.&#x20;

{% stepper %}
{% step %}

### Open Page

Open the domain search in the storefront.
{% endstep %}

{% step %}

### Open Dev Tools

Open the dev tools of your browser (F12), entering the "network" tab.
{% endstep %}

{% step %}

### Perform check

Enter the requested domain and perform the check.
{% endstep %}

{% step %}

### Open AJAX request

Open one network request which matches your TLD. You will see the WHOIS response which you can use to check if there is an issue with the pattern or the whois server.\ <img src="https://4059027548-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnJHcdSq7NNv7Ws704nzw%2Fuploads%2F1eVBnqjYZhcUn9nWQm30%2Fimage.png?alt=media&#x26;token=a1dea928-bfa3-43db-804c-0932ba7e29d3" alt="" data-size="original">
{% endstep %}

{% step %}

### Adjust whois-servers.json

Adjust the JSON file, clear the cache, try again.
{% endstep %}
{% endstepper %}
