Tag Archives: How to check if domain is registered

Check if a domain is Registered with PHP

Hi there guys! We are going to look at a very simple php snippet that lets you know if a specific domain is registered / available for purchase or not.You could expand / grow this snippet and make your own website that checks websites domains for availability. To check if a domain is registered or not we will use theĀ checkdnsrr function that PHP provides us.This function searches for the DNS records of the specific website / domain and if they aren’t available that means the domain isn’t registered.Here is a simple script that you can use:

All you need to do is replace the value of theĀ $domain variable with the one you want to check and you’re good to go.For this example, the result / output is: grohsfabian.com is already registered !