PHP Code To Check Domain Availability

 |  |  | No Comments

There are many ways to check the Domain Availability using PHP script and online tools like BlueHostDreamHostHostGatorWpwebhost. Many users are searching PHP code to find the domain availability in the market but they are redirected to the hosting site which I have mentioned.

I was searching code to find the Domain Availability but most of the time I found the PHP code which was working with premium API and sometimes they redirected to the Web Hosting website.

PHP code to Check Domain Availability.


  • When you search for the domain make sure that they will meet to requirement. Most of the hosting websites are not allowing less than 3 words for the domain.
  • Please add .com, .org, .net in the last of domain name and do not add http:// at the starting.
function awblogger_domain_availability($domains){
    $ns=  @dns_get_record($domains,DNS_NS);
    if(count($ns)) {
        $rs  = "Not Available ";
        $rs     = " Available ";
    echo '<strong>'.$domains.': </strong>'.$rs;

$domains = ''; 
$isAvailable= awblogger_domain_availability($domains);
echo $isAvailable;

Recommend to you to check your domain availability on the BlueHost.


Leave a Reply

Your email address will not be published. Required fields are marked *

15 − ten =

You May Like Also