To overcome that there are several software and addons to block those ads but those solutions are rather limited to a single browser and the next time you change your PC you will have to re-install those software.
Instead of using multiple software for multiple programs to block advertisements you can use a simple trick that will block those ads out without the need for installing any software. Just follow the short and simple steps below.
Step 2: Open the hosts file using notepad. (Right click- Open With Notepad)
Step 3: Below "127.0.0.1 localhost", add 127.0.0.2 www.site-you-want-to-block.com. (Eg:- 127.0.0.2 www.facebook.com). After then, Facebook.com will be blocked and will no longer be accessible.
Similarly, to block more unwanted websites, add 127.0.0.3 www.sitename.com
Save the changes made to the file and close it. Test it by trying to open the blocked sites. You will see “Unable to connect” message.