I do realize that there are different wat to check the existence of a website in C# and other languages. However, I have come to understand that some of them don't work as good. For example, this code:
WebClient client = new WebClient();
try
{
string response = client.DownloadString(url);
return true; // Successful -> the website does exist.
}
catch
{
return false; // Unsuccessful -> the website doesn't exist.
}
doesn't detect www.bb.com, although this website clearly does exist. What code should I use to be absolutely on the safe side here?