简体   繁体   中英

How to check if a domain name of a url is active or not(i.e. not expired)?

I'm working on a url categorizer webservice wherein,the input url is classified using the naive-bayes classifier. For this I firstly need to check if the domain name of the input url is valid and in service (ie not expired). I have tried the using the Whois lookup api in my java program to find the expiry date of domain name. But that has some shortcommings-
1. It supports only a set of TLD's (ie Does not support .tv, .com.au etc.).
2. The expiry date mentioned is not accurate.

For example- When checked in browser 'aparichitudu.com' displays the content as- "Domain not active."

But the Whois lookup describes the domain name status as "OK" and its expiry date as "20-06-2015" which means the domain is active.

Is there any other way by which I can determine wheather the domain name is in service or not ?

That a name is registered does not necessarily mean that it is in use. There are many names that are registered for protection, but never delegated. A WHOIS lookup should give you results for those, while URLs using them will not work.

Instead, simply do an address lookup for the domain name in the URL. If you get addresses, it's active and works. If you don't, it's not and doesn't.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM