How to prevent certain websites in my browser

I am using Firefox 33.0 on my Ubuntu 12.04 but apparently I cannot prevent a website from being opened in the browser, is there a way to do that, like using some system configurations?. What about preventing a website permanently on the system regardless of the browser being used? Thanks in advance.


One option for you is to block the websites through DNS. On Ubuntu, you may follow the instructions on this answer. You may need to clear your DNS cache from Ubuntu to make sure all DNS query are executed again, thus creating a new cache without the blocked websites. This will not prevent the access to the website itself, but it'll make impossible for your browser to translate www.exemple.com into 67.23.11.1, for instance.

You may apply those rules on your router to further improve the block.