In this article you will find the following:
While many believe that Macs are immune to viruses, that’s not true. A Mac can get viruses from websites just like any other computer. Apple builds security protections into macOS to protect its machines, but they cannot stop all online threats.
Here are some of the biggest myths and facts on how MacBooks and Mac desktops can be infected while browsing the internet:
|Macs are immune to viruses, so there’s no need to use antivirus software on them.
|Macs can be infected with viruses and malware just like any other computer.
|Only malicious websites contain viruses that can infect your Mac.
|Any website, even legitimate ones, could contain malicious code if it has been hacked.
|You have to download files to get a virus on your computer, so just visiting a potentially unsafe website isn’t a problem.
|Simply visiting a dangerous website is enough to infect your Mac, thanks to much more sophisticated viruses that are widely used today.
|Your Mac’s built-in security protections will block all malware and viruses before they can do damage to your machine.
|Hackers are always finding new ways to circumvent built-in security protections and hide their malicious code, and no antivirus software can detect 100% of all viruses.
If you’ve ever wondered can Macs get viruses while browsing the internet, the answer is yes.
The number of infections designed for macOS has steadily increased over time as the OS has become more popular, which means it’s important to protect yourself no matter what you do online. Even legitimate websites can be hacked to send out malicious code.
Before we begin:
You can protect your Mac from viruses and remove malware by using MacKeeeper’s Antivirus. It works in real-time to identify and block potential threats as soon as they appear, keeping your Mac and all your data safe. Here’s how to get started:
- Download MacKeeper and install it on your computer.
- When MacKeeper opens, select Antivirus in the sidebar.
- Click Launch Antivirus and enter your Mac’s password when prompted.
- Click Next then select Start Scan to check for malware on your device.
- If a virus is found, click Move to Quarantine to block and delete it.
How Mac can get viruses from websites
There are a number of ways a Mac can pick up viruses when browsing websites online, the most common of which are through exploit kits and website vulnerabilities.
1. Exploit kits
Exploit kits have become one of the most widespread online threats due to the fact that they’re almost entirely automated and can be executed silently without a user knowing. Hackers use compromised websites to divert traffic to their malicious code, which then infects a user’s system. Once inside, the kit can install malware, ransomware, and other nasty threats.
A recent example of this is the HanJuan exploit kit that surfaced in 2015, which uses fake ads and shortened URLs to redirect unsuspecting users to malicious sites. It takes advantage of vulnerabilities in software like Internet Explorer to evade antivirus protections, and it can be used to inject viruses, password stealers, and other dangerous software onto a machine.
2. Website vulnerabilities
Website vulnerabilities are flaws, bugs, or other weaknesses in a website’s HTML code that hackers can use to gain unauthorized access. Once inside, attackers may be able to steal sensitive user information, or they may be able to hack the site to distribute malicious code. Many believe that only malicious websites are dangerous, but that’s not always the case.
For example, a vulnerability in the gaming platform Steam, discovered in 2017, allowed for an attack called cross-site scripting (XSS). Attackers could use this to inject malicious scripts into the application, allowing them to steal login information, use funds on other user’s Steam accounts, and even spread malicious software using an auto-download file.
Why some websites have viruses
There are many reasons why websites have viruses, such as bugs or flaws in their code, and out-of-date technologies that allow attackers to exploit them. Some websites, such as those offering pirated content, are more likely to host viruses because of the nature of the service they offer. Be careful.
Other reasons include:
- Failing to install updates or improve website code
- Fake or malicious ads and pop-ups
- Hijacked links that redirect a visitor to malicious sites
- Allowing users to distribute their own files that could be dangerous
How to protect your Mac from viruses on websites
Now you know that you can get a virus by visiting a website on Mac, let’s look at how you can protect your Mac to prevent or remove them. Here are the most effective methods:
- Keep your system and software up-to-date
- Avoid questionable websites
- Use web browser default configurations
- Enable the pop-up blocking in your web browser
- Use antivirus software
1. Keep your system and software up-to-date
To set your Mac to download software updates automatically, follow these steps:
- Open System Settings on your Mac.
- Click General in the sidebar, then select Software Update.
- Next to Automatic Updates, click the i icon.
- Enable Check for updates and Download new updates when available.
- To install new updates automatically, enable Install macOS updates.
- Click Done.
Updating macOS and the software you use is the best way to ensure they contain no bugs or flaws that could be exploited by hackers. You can set your Mac to download software updates automatically, while apps can be updated through the Mac App Store or within the app itself.
2. Avoid questionable websites
To avoid a Safari virus from unsafe websites, you can practice these safe browsing tips:
- Check URLs carefully to ensure you’re visiting legitimate sites.
- If a browser tells you a website is unsafe, leave it.
- Don’t click on links sent to you by email or text.
- Don’t click on suspicious ads or pop-ups.
- If a website you know doesn’t look right, don’t trust it.
3. Use web browser default configurations
Every web browser has default configurations that are designed to keep you as safe as possible online. Some people like to change the default settings without realizing that some alterations can have a negative impact on browser security.
To reset Safari back to its default configuration, follow these steps:
- Open Safari, then click Safari > Settings in the menu bar.
- Click the Extensions tab.
- Select any Extensions you don’t recognize or need, then click Uninstall.
- Click the Privacy tab, then select Manage Website Data.
- Select the Remove All button, then confirm.
- Click the Advanced tab, then enable Show features for web developers.
- Select Develop > Empty Caches in the menu bar.
Note from our team: It’s not possible to restore Safari’s default settings with a single button, unfortunately, but the steps above will remove all website data and third-party extensions, leaving you with a fresh Safari as much as possible. Similar steps can be performed inside third-party browsers like Google Chrome, but it may be easier to uninstall and then reinstall them instead for a default setup.
4. Enable the pop-up blocking in your web browser
Most modern browsers have the ability to block pop-ups that can be used to spread malicious software—one of the most common ways you can get a virus on your Mac from viewing a website.
Here’s how to do that in Safari:
- Open Safari, then click Safari > Settings in the menu bar.
- Select the Websites tab, then click Pop-up Windows.
- Next to When visiting other websites, select Block and Notify.
You can also block settings in other web browsers like Google Chrome, Microsoft Edge, and Firefox, and in many cases, this feature will be enabled by default. If not, the instructions are similar to those listed above.
5. Use antivirus software
One of the best and most effective ways to get rid of a trojan virus and stop malicious software from infecting your Mac is to use antivirus software. We recommend using MacKeeper Antivirus to protect your machine.
- Download MacKeeper on your Mac using the official installer.
- When MacKeeper opens for the first time, select Antivirus in the sidebar.
- Click the Launch Antivirus button, then enter your password when prompted.
- Once the Antivirus is enabled, click Next.
- You can now click Start Scan to check your Mac for infections, or click the Enable button to activate real-time antivirus monitoring, which is recommended.
- After clicking Enable, select Open Preferences.
- Click the lock at the bottom of the window, then enter your password to change settings.
- Click the Allow button to give MacKeeper’s Antivirus permission to run.
- You also need to give MacKeeper full disk access so that it can find any malicious software no matter where it’s located. To do this, open System Settings, then select Privacy & Security.
- Select Full Disk Access, then click the toggles next to MacKeeper and MacKeeper Real-time Protection to enable them.
Keeping your Mac free from viruses
Although viruses are a very real threat on Mac, just like they are on other computers, it’s not difficult to keep your machine protected and safe when you’re online. You can avoid picking up viruses from websites by not clicking suspicious links, blocking pop-ups, and avoiding sites that are identified as unsafe by your browser.
The best way to protect your Mac is to use antivirus software, like MacKeeper’s Antivirus. It can find hidden threats and remove them from your system, and it identifies new risks in real-time so that they can be stopped before they can cause any harm to your Mac or its data.
*You can download the app for free and try its functionality yourself before making a purchase.