osx hosts file not working
The hosts file does not support wildcards, so you have to map each domain and subdomain,
which means, you need to add 

173.252.110.27   www.google.com


as well. If you are redirect to a local version of google, eg like www.google.fr, you need to add that as well.

You can edit the host file easily from a terminal window without changing the file format to RichText or similar by running the following command:

$ sudo nano /private/etc/hosts


You need to enter your password. Afterwards, add your changes at the end of the file, not the beginning.

At the end, flush you DNS cache or reboot your mac.