Cannot access any websites { other than google, yahoo, gmail, youtube and facebook (http type) } on macbook air A week ago I had installed avast antivirus plus avast vpn for about an hour. That exact moment I encountered this trouble for the first time. 
Then I uninstalled avast by clicking on the uninstall avast icon. 
The problem still persisted.
Then  I didnt switch on mac for a day.
When I did the problem was gone and mac was back to normal. And i started downloading el captain on appstore.
Then I switched it off and restarted after sometime. The problem returned and the downloading showed error.
Then again after 2 days I tried same technique and the internet was alrite. But after i switched it off and restarted the problem began again.
I am not able to view any websites other than the above mentioned ones. Nor am I able to download any apple apps or update them on appstore.
I have tried Pram, safe boot, Nvprm etc.....
(I can view websites in safe boot mode but not in normal mode)

Can anyone please explain to me .. how to solve this???
Assuming the actual issue lies in the fact that Avast has messed with some of your connectivity settings, I recommend re-installing the software, followed by performing another uninstallation.


  (((Avast has some pretty good instructions letting us know that throwing it into the trash does not uninstall the software for Avast (I know your explanation mentioned you clicked on uninstall, but I'm just  covering basics here).)))


Avast Official Instructions:


Click the Avast Menu bar icon  on the top-right of the screen and
select Open Avast to open the Avast user interface,
...alternatively, open Finder, go to Applications, and double-click
the Avast icon.
Then click Avast in the Menu bar on the top-left of the screen,
select Uninstall Avast,
...and when asked to confirm the uninstallation, click Uninstall.


Source (has pictures to follow).