For a url entered by the user :
check that is any webserver hosting the domain name or not ?
For example :
url='laksjdfaksdfjajdfaljewoifjadslkjflkasjrlwkejk.com' Now, the above url does-not exists, so there is no point of check for any HTTP error codes since, no server is there that will reply back.
So, how to detect such url ?
isServerUp() ?