
Want a domain search box on your site? This widget tells whether a name is free or registered, shows the price and free alternatives, and its Register button opens the MozOut registration page. It works on any website, not only WordPress.
What it does
It is plain JavaScript, with no dependencies and no cookies, about 5 KB gzipped. It uses the free WHOIS of the API and needs no key.
What you need
Just a way to add one JavaScript file and two lines of HTML to your site.
Installing, step by step
|
|
|
<div data-domain-search></div>
<script src="domain-search.js" defer></script>
You can also mount it from JavaScript: DomainSearchWidget.mount(element, { lang: 'en' }).
Options
data-lang: pt or en. Empty follows the browser.
data-extensions: the extensions to check together, up to 10. The first one is used when the name has no extension.
data-currency: the price currency. Empty uses the brand currency.
The API key and its permissions
There is no key. The widget uses the free WHOIS of the API (GET /v1/whois/{domain}). Each visitor can make 60 lookups per hour, and each extension checked counts as one. See the details in the WHOIS documentation.
Testing before you publish
As it uses no key, there is no sandbox_ key to try. Open demo.html, a working page, and adjust the options there.
Good to know
Look: the widget uses the font and text colour of your page. Change the rest with CSS variables on .dsw, such as --dsw-accent, --dsw-border and --dsw-radius. The full list is in the README.
Accessible: screen readers read out the results, the form works with the keyboard alone, and the loading animation stops when the visitor prefers reduced motion.
Privacy: nothing is stored in the browser and no cookies are sent.
Help
If the box does not show or gives no results, open a support ticket and tell us the page address. The code is in the widget repository, under the MIT license.
|
Ready to add domain search to your site? Download the latest release |
|
SEE ALSO |
RECOMMENDED PRODUCT Register your .com domain Secure your company name before someone else registers it. from KSh2,210.00/yr Search a domain |











