Inconsistent HTTP Connnection

Insure you have a reliable dns server selected in your static IP settings, or use dhcp to get your network settings. Then use this. A return value of 1 is the only success value. Any other return value is a fail.

char server[] = "www.mydomain.com";

 if(client.connect(server,80) == 1) {