Premium Domain Names for Sale at
Domain Name Wire | Domain Name News
Domain Name Industry News
Alvin Brown provides a tutorial on how to create a personalized domain name suggestion tool using GoDaddy’s API.
It’s been a while since my last tutorial spotlighting the use of GoDaddy’s API to retrieve a list of domains associated with your GoDaddy account.
Today’s tutorial aims to help create a simple tool that returns available domain names based on submitted keywords and domain ideas.
Domain Suggestion Tool using GoDaddy API
There is no shortage of domain name suggestion tools available when brainstorming what to name your next product, service, business, or project.
Before diving into today’s tutorial, please review and read previous tutorials to learn how to get started using GoDaddy’s API, and its various API endpoints offered to programmatically manage various aspects of your account.
At the end of this tutorial, you’ll find a link to download the zip file containing the entire code example for the domain name suggestion tool.
It’s also worth noting the tutorial code is procedural instead of object-oriented for the sake of simplicity, and not encouraged for use in or as production-ready environments.
Another key detail to pay close attention too, it ensuring you add/replace GoDaddy API credentials with your own credentials, or this tutorial will not work.
Without further ado, open up a text editor of your choice, and let us get started.
Again, I won’t dive into the details but will give a high-level overview of the necessary parts to use GoDaddy’s suggest method to retrieve a suggested list of alternate domains.
From a text editor of your choice, save and name the following php file: suggest.php. With main file created, the first item of business to address is the HTML form used to submit keywords. Copy and paste the following html into the suggest.php:
Domain Suggestion HTML Form
The code screenshot is really simple, containing a mix of PHP, HTML, Javascript, and CSS. The styling of the page can be found in the following css files for Bootstrap 3 and a local file I created (see zip file):
The last 10 or so lines of code in the suggest.php contains the logic to display a suggested list of alternate domains once the form has been successfully submitted.
Domain Suggestion Tool Client-Side Code
Although contained in the suggest.php file, the results of the PHP code above are not visible from a web browser on initial page load. The form must be completed and submitted to reveal results.
With the frontend UI/UX in place, let us dive into the page functionality once submitting keywords or domains for suggested list of alternate domains.
At the very top of the suggest.php file, copy and paste the following PHP logic:
Domain Name Suggestion Tool - PHP Code
The first item to note in the image is the use of PHP’s built-in define function, which is implemented to define the constant variable SITE_NAME (i.e., Domain Suggestions).
The next set of variables to define are mission critical to authenticate and instantiate a GoDaddy API request. The API_KEY and API_SECRET credentials can be obtained by visiting the API Key Management page.
After defining critical variables for GoDaddy API authentication, the next set of variables to define are as follows:
The PHP logic for what should occur when form is submitted can be executed once variables are defined. The code below determines whether or not the submit button has been pressed.
Domain Suggestion Tool - Submit Button PHP Code
If submit button has been pressed, then an error message is defined by default using the msg variable. In this case, the error message is displayed if the user clicks the submit button without entering a keyword.
The next few lines proceed to sanitize submitted keywords (i.e., $_POST[‘domain’] is cleaned and set as value of keywords variable) to ward off any hackers attempting to hijack the search tool should host on a public web server.
The last line of logic contains all the heavy lifting. If keywords variable is not empty and is defined, then the following variables are defined:
Completing the aforementioned variable definitions closes out the PHP logic for establishing and displaying the suggested list of alternate domains.
But not so fast though. If you were to open a web browser and attempt to execute code up to this point, you would encounter warnings of the following functions not defined: getDomains, RemoveSpecialChar, and printDomainResults.
Below is a high level overview of 3 critical functions necessary for successfully executing this tutorial (each function is included in suggest.php file):
The getDomains function is the brains of searching and compiling the suggested list of alternate domains based on source (i.e., typer variable) and keyword (i.e., keywords variable). Within this function exists PHP’s built-in CURL method that makes the API request to the suggest method with submitted keywords and sources.
In addition, feel free to modify the country and limit variables as well as add variables to narrow or expand domain search based on GoDaddy’s suggest method attributes:
The RemoveSpecialChar function is the most simple of the 3 functions, using PHP’s preg_replace and regex to remove any special characters from keyword submittal.
The printDomainResults function prepares domain results to present to web browser display using HTML. Each domain is linked to GoDaddy’s domain availability page to check the domain’s availability for registration (see image below).
Domain Suggestion Results
I encourage you to download the tutorial code, make necessary modifications, and see where this tool takes you.
DOWNLOAD for GoDaddy API Suggest
If hand registering domains is your strategy, or you simply need assistance in discovering an alternative domain for your next business, idea, project or whatever, this tool aims to help you save time and money.
With not much effort and slight modification to the printDomainResults function, you could easily host your very own domain search tool for the general public to use.
Taking the aforementioned path could transform this tool into a profit center using affiliate services (i.e., CJ Affiliate) to associate domain registrations to domain registrars (i.e.,, GoDaddy, HostGator and many more…). (hint hint) 😉
Please don’t hesitate to leave comments should you have questions or encounter technical challenges implantation this tutorial.
Thanks and that’s all for now!
Categories: Domain Registrars
Stay up-to-date with the latest analysis and news about the domain name industry by joining our mailing list.
No spam, unsubscribe anytime.
Peter Sharpe says

This looks like the Verisign API underneath, not built by GoDaddy.
Alan Dodd says

Okay so do you go about getting an API key, can you share the link? Thanks!
Alvin Brown says

Hi Alan – The link is shared in the “Creating PHP logic for domain name suggestion tool” section as well as the 3rd link from beginning. 🙂 Visit to create an account and obtain necessary API keys. Thanks and hope you find value in this tutorial.
Domain Name Wire is a trade publication for the domain name industry covering topics relevant to domain investors, brand owners, policy makers, domain registrars and registries, and more. Read More About DNW
Stay up-to-date with the latest analysis and news about the domain name industry by joining our mailing list.
No spam, unsubscribe anytime.
© 2005–2022 Domain Name Wire · DNW and Domain Name Wire are trademarks of Brainstorm Labs, LLC

Premium Domain Names:

A premium domain name is a highly sought-after domain that is typically short, memorable, and contains popular keywords or phrases. These domain names are considered valuable due to their potential to attract more organic traffic and enhance branding efforts. Premium domain names are concise and usually consist of one to two words or two to four individual characters.

Top-Level Domain Names for Sale on

If you are looking for top-level domain names for sale, you can visit is a platform that offers a selection of domain names at various price ranges. It is important to note that the availability of specific domain names may vary, and it’s recommended to check the website for the most up-to-date information.

Contact at

If you have any inquiries or need assistance regarding the domain names available on, you can reach out to them via email at Feel free to contact them for any questions related to the domain names or the purchasing process.

Availability on,, and

Apart from, you can also explore other platforms like,, and for available domain names. These platforms are popular marketplaces for buying and selling domain names. Each platform may have its own inventory of domain names, so it’s worth checking multiple sources to find the perfect domain name for your needs.

#PremiumDomains #DomainInvesting #DigitalAssets #DomainMarketplace #DomainFlipping #BrandableDomains #DomainBrokers #DomainAcquisition #DomainPortfolio #DomainIndustry #DomainAuctions #DomainInvestors #DomainSales #DomainExperts #DomainValue #DomainBuyers #DomainNamesForSale #DomainBrand #DomainInvestment #DomainTrading

Leave a comment