Search code examples
phpnetwork-programmingdns

How to check a domain age using php


Hello I was wondering if there is a nice way to find out what is the age of a specific domain.

But I want to find out a way to do this programmatically asking the DNS to check a domain age using php and not from an online tool.

I am searching on the internet to find out how google is checking my domain age and other SEO tools.

Is this information private for a domain where you must have special permissions to ask what a domains age is? And if yes? How come google knows my domain age? noone asked my domains age.. how come they know it?


Solution

  • You want WHOIS, most recently defined in RFC3912:

    $ whois stackoverflow.com
    
    Whois Server Version 2.0
    
    Domain names in the .com and .net domains can now be registered
    with many different competing registrars. Go to http://www.internic.net
    for detailed information.
    
       Domain Name: STACKOVERFLOW.COM
       Registrar: GODADDY.COM, INC.
       Whois Server: whois.godaddy.com
       Referral URL: http://registrar.godaddy.com
       Name Server: NS1.SERVERFAULT.COM
       Name Server: NS2.SERVERFAULT.COM
       Name Server: NS3.SERVERFAULT.COM
       Status: clientDeleteProhibited
       Status: clientRenewProhibited
       Status: clientTransferProhibited
       Status: clientUpdateProhibited
       Updated Date: 30-nov-2010
       Creation Date: 26-dec-2003
       Expiration Date: 26-dec-2014
       
       [...]