change method for getting url's status code

Now 'google.com' is not invalid.