I don't know if this applies to your issue, but I see they're different addresses, thus different servers, doing different things, maybe even different services/protocols/ports. Try executing "nslookup www.google.com" and "nslookup google.com", to see that they are not the same.
In this case I can't go any further because I used ESP WiFi connections, never used a GSM SIM800 connection to a remote server, so I'm sorry I can't say much if something could/must be changed or wrong but I'm waiting with you for someone with such kind of experience.
PS: it seems to me the "WiFiClientSecure.h" library is missing, but I don't know...