Here are the steps to be followed
STEP 1 :-
1) Open terminal (by searching in the spotligth or under apple icon at the top ) .
2)Enter following code
OS X Mountain Lion or Lion or Mavericks
Use the following Terminal command to reset the DNS cache:
sudo killall -HUP mDNSResponder
Mac OS X v10.6
Use the following Terminal command to reset the DNS cache:
sudo dscacheutil -flushcache
3)Press enter key or return key.
1)Open finder and click on go in the right top menu and click on OPTION key .
2) Open library from that .
3) In that delete following folder contents Caches, logs,cookies and delete them.
4) Open preferences and find
com.apple.systempreferences.plist
and delete it .
1) Open SYSTEM PREFEERENCES and go to network tab.
2)At the click on arrow mark near to the LOCATION .
3)In that click on "+" and create a new location.
4)Apply the settings.
5) Customise the new location.