Cryptocurrency is a digital asset designed to work as a medium of exchange using cryptography to secure the transactions and to control the creation of additional units of the currency. Cryptocurrencies are digital or virtual currencies that make use of encryption for security. As they are anonymous and decentralized in nature, one can use them for making payments that can’t be tracked by governments.
This crypto-mining has also fueled the ethics debate as the website owners are found to be keeping the visitors in the dark. This has also inspired some developers to come up with methods to block cryptocurrency mining in the web browser via different methods. Before knowing how to block websites from mining cryptocurrencies using your CPU via your browser, find out if you’re already becoming a target of such mining activities.
How to find out if my PC is secretly mining cryptocurrency?
Here’s how you can spot a website which is using your web browser to mine crypto-coins.
If you ever visited a website and felt a sudden slowness in your computer, there could be possible chances that your web browser is running a script to mine cryptocurrencies. The best way to spot the miner is by checking the CPU usage. You can use this technique to see if a particular website is sweating your processor and earning money. Look for those huge spikes in your CPU usage.
How To Block Cryptocurrency Mining In Your Web Browser?
Most of the websites are using Coin Hive for mining. And they are using JS based minor. There are few simple ways to block such activities:
1. Use Chrome extensions:
Installing Chrome extensions is the most straightforward method to stop coin mining in the web browser. No Coin and MinerBlock are two handy browser extensions specifically designed to block popular crypto miners on web pages from using your computing power. Both the extensions allow one-click mining blocking solution. You just need to install any of these extensions and you will see an icon in address bar.
A) No Coin Chrome Extension
No Coin is an open-source extension which is a reliable and safe way to control how a website is interacting with your web browser.
As soon as you visit a website that has installed a miner, No Coin will detect and show if any such activity is going on. While this extension blocks any such activity, it also allows you to whitelist a website for a period of time. It means you can choose to remove certain sites from your list of blocked domains in case you want to deliberately lend your CPU for usage. Clicking on the icon in the address bar shows you a button to pause/unpause its function.
B) MinerBlock Chrome Extension
Alternatively, you can use ‘MinerBlock’ extension. Just like No Coin, minerBlock Chrome extension is also an open-source tool that allows users to block cryptocurrency miners in the web browser. This extension also allows users to blacklist and whitelist a website for a period of time.
2. Use Adblocker
Adblock is indeed a great extension for blocking ads. However, you can also manually add the crypto miners in question to your list of blocked domains using Adblocker.
In Chrome, install the Ad Blocker extension and then go to Customize > Block an ad by its URL. Then add the following URL in the text box
Most of the people are using Coinhive for bitcoin mining, this will block mining from most of the websites. Depending on your web browser, you can find relevant settings to block particular domain
3. Block coin mining domains in hosts file
This is the manual way of blocking particular domains that you find harmful or irritating. Due to such blocking, your browser won’t be able to connect to these domains. We can edit the hosts file of the operating system so that those domains redirect to localhost (IP address 0.0.0.0).
To add Bitcoin mining domains to the hosts file:
- On Linux, you need to open the hosts file by running “sudo nano /etc/hosts” command and add “0.0.0.0 coin-hive.com” to the end of the document. On Mac OS X, you can run sudo nano /private/etc/hosts. Replace nano with whatever editor you favor.
- For Windows, navigate to C:\Windows\System32\drivers\etc and edit the hosts document to add “0.0.0.0 coin-hive.com” at the end.
TIP: Make sure you press the Tab-key after entering the IP address 0.0.0.0 and save the document.
Please note that this change blocks the mining scripts which are hosted only by coin-hive.com, but not any sub-domain such as www.coin-hive.com. So, you may need to add these variants if they are used as well to the hosts file. In case you come across other mining script domains, you can add them further down the line.
Before using NoScript to block cryptocurrency mining in the web browser, please note that it’s pretty aggressive and it could break lots of websites as it disables all scripts running on pages.
Now you know how to block Cryptocurrency mining. You can use any one of these methods to get rid of the cryptocurrency mining in the web browser.
Stay alert, stay safe!
Download Our Crypto News Android App And Never Miss Any Update.