Guide · Virus warnings

Virus warning pop-ups on your Mac? How to stop a website’s fake warnings

A box slides in at the top right of the screen: “Your Mac is infected with 5 viruses”, “McAfee: your subscription has expired”, “Apple Security Alert: call this number”. It looks like an antivirus warning, but it almost never is. It is a website sending you notifications, small messages it was once allowed to send. These steps stop it, browser by browser.

In short

Don’t click the warning, don’t call any number in it and don’t pay: it is a website trying to scare you, not a virus. Find the website’s name on the warning, in smaller letters near its bold title, then block it in your browser’s settings, under Notifications. In Safari: Safari › Settings › Websites › Notifications (Preferences on macOS 12). A warning page that won’t close: press and hold Esc for a few seconds, then Force Quit the browser (Option-Command-Esc, or Apple menu › Force Quit).

1. What these warnings are

Websites can ask to show you notifications. If you, or someone using your Mac, once clicked Allow on a website that asked, it can send messages that slide in at the top right of the screen, even when the website isn’t open. Scam websites use this to send warnings that look like they come from an antivirus or from Apple.

Apple’s advice: if a pop-up warns you about viruses or security problems on your device, don’t believe it, and don’t call the number or follow its links (Apple’s page on scams). Apple doesn’t send warnings like these, and Windows Defender doesn’t run on a Mac.

To see where a warning comes from, look for the website’s name on it, in smaller letters near its bold title: in Chrome, Edge and Brave it’s the line just under the title, such as push-alerts.xyz. That name is the website to block. If the warning has already slid away, click the date and time at the top right of the screen to see it again.

After you block a website, the warnings it sent before stay until you close them with their x. Older ones are in that same list, under the date and time.

2. Stop them in Google Chrome

  1. In Google Chrome, click the three dots at the top right of its window, then Settings.
  2. Click Privacy and security, then Site settings, then Notifications.
  3. Under Allowed to send notifications, find the website from the warning. Click the three dots next to it, then Block.
  4. Block any other website there that you don’t know.
  5. To stop websites asking at all, choose Don’t allow sites to send notifications under Default behavior.

3. In Microsoft Edge

  1. In Microsoft Edge, click the three dots at the top right of its window, then Settings.
  2. Click Privacy, search, and services, then Site permissions, then All permissions, then Notifications.
  3. Under Allowed to send notifications, find the website from the warning. Click the three dots next to it, then Block.
  4. To stop websites asking at all, turn off Ask before sending (recommended).

4. In Brave

  1. In Brave, click the three lines at the top right of its window, then Settings.
  2. Click Privacy and security, then Site and Shields Settings, then Notifications.
  3. Under Allowed to send notifications, find the website from the warning. Click the three dots next to it, then Block.
  4. To stop websites asking at all, choose Don’t allow sites to send notifications.

5. In Firefox

  1. In Firefox, click the three lines at the top right of its window, then Settings.
  2. Click Privacy & Security on the left, scroll down to Permissions, then click Settings next to Notifications.
  3. Find the website from the warning, and choose Block next to it.
  4. To stop websites asking at all, tick Block new requests asking to allow notifications. Then click Save Changes.

6. In Safari

  1. In Safari, choose Safari › Settings in the menu bar at the top of the screen. On macOS 12 Monterey, it’s Safari › Preferences.
  2. Click Websites at the top, then Notifications at the bottom of the list on the left.
  3. Click the website from the warning, then Remove, or choose Deny next to it.
  4. To stop websites asking at all, untick Allow websites to ask for permission to send notifications.

In newer versions of macOS, a website’s notifications in Safari also appear in Apple menu › System Settings › Notifications, under Application Notifications: click the website and turn off Allow notifications (Apple’s guide). Safari’s own setting above works on every macOS, macOS 12 Monterey included, and removes the website for good.

7. A warning page that won’t close

Some scam pages fill the screen, say your Mac is locked and show a phone number to call. Don’t call it, and don’t type anything into the page: it can’t harm your Mac by itself.

  1. Press and hold the Esc key, at the top left of your keyboard, for a few seconds to leave full screen. A short press isn’t enough on a page that holds the keyboard.
  2. Press the Option, Command and Esc keys together, or click the Apple menu at the very top left of the screen and choose Force Quit.
  3. Click your web browser in the list, then Force Quit, then Force Quit again. Anything you were typing in it is lost.
  4. Open the browser again. If it offers to restore your pages, close that message. For Safari, hold down Shift while you open it, so its last windows don’t open again (Apple’s tip).
  5. If the warning page opens again, close its tab with the small x on it.

Then check the browser’s notifications as above: such a page has often asked to send warnings too.

8. Warnings from an app you installed

If the name on the warning is an app’s rather than a website’s, the message is that app’s own. McAfee, Norton, Avast, Bitdefender, Malwarebytes, Intego, CleanMyMac and MacKeeper are real apps, and their alarms are often there to sell their paid version: they don’t mean your Mac has a virus. To stop an app’s messages:

  1. Choose Apple menu › System Settings, then click Notifications (Apple’s guide).
  2. Click the app in the list.
  3. Turn off Allow notifications.

On macOS 12 Monterey: choose Apple menu › System Preferences, click Notifications & Focus, then Notifications at the top, click the app on the left and turn off Allow Notifications. The same steps stop all of a browser’s messages, real ones like mail alerts too, if you can’t find the website.

When the warning is real

One warning is macOS’s own, and real: a message in the middle of the screen, not at the top right, about an app or a file you just opened, saying it “will damage your computer” or that Apple can’t check it for malicious software. Click Move to Trash, never Open. macOS checks apps for known malware by itself, and moves known malware to the Trash (Apple’s page).

Advice you can skip

  • Calling the number in a warning. Real companies don’t ask you to call them from a pop-up. The person who answers wants money, or to get into your Mac.
  • Paying to “renew” from a pop-up. If you do pay for an antivirus, check your subscription on its maker’s own website, typed in yourself.
  • Installing the cleaner or antivirus a warning offers. It is often the scam itself.
  • Erasing your Mac or resetting your browser. Blocking the website’s notifications stops the warnings, and keeps your files, passwords and bookmarks.

Common questions

Is the virus warning on my Mac real?

Almost never. A box at the top right of the screen that says your Mac is infected, or that an antivirus wants you to renew, is a website’s notification. Don’t click it, call it or pay; block the website in your browser’s settings, under Notifications.

Why do I get these warnings when my browser is closed?

A website you once allowed can send notifications when it isn’t open, and Safari’s come even when Safari isn’t open. A Mac browser also keeps running after you close its last window, until you quit it. Blocking the website in the browser’s settings stops them.

Should I call the number in a virus warning?

No. Apple and real antivirus makers don’t ask you to call them from a pop-up. The people on that line try to get money or remote access to your Mac. If you already called and let them in, ask someone you trust to help you check your Mac and your bank.

How do I stop websites asking to show notifications?

In Chrome and Brave, choose Don’t allow sites to send notifications; in Edge, turn off Ask before sending; in Firefox, tick Block new requests asking to allow notifications; in Safari, untick Allow websites to ask for permission to send notifications (in Safari › Settings, or Preferences on macOS 12, under Websites › Notifications).