Browsing the web on a desktop computer can sometimes feel like a carefully crafted test of your sanity. You’ve got ads and auto-playing videos popping up left and right, and you’ve even got pop-ups from sites asking you for permission to send more pop-ups in the form of notifications. It’s enough to make anyone crazy.

I don’t know about you, but I almost never want a website to send me notifications — not while I’m actively looking at the site and certainly not while it’s closed. Thankfully, a minute or two of simple tweaking can stop your browser from ever allowing such invasive invitations to pester you again.

We’ve included instructions for Chrome, Firefox, and Safari. Just follow the steps below. Your sanity will thank you.

Stop notifications in Chrome

Click the three-dot menu icon in the browser’s upper-right corner and select “Settings.”

Scroll down to the bottom of the screen, click “Advanced,” then click the “Site Settings” option under the “Privacy and security” header.

Click “Notifications” on the screen that appears next.

Click the toggle next to “Ask before sending (recommended).” That’ll cause the toggle to turn from blue to gray and the text to change to “Blocked.”

If you want to allow only a small number of specific sites to send you notifications — sites like Twitter and Gmail, for instance — you can add them as whitelisted exceptions on that same Chrome settings page:

Click the “Add” button next to the word “Allow.”

Type in the URL of the site you want to whitelist using the following format: twitter.com/* — or, for another example: mail.google.com/mail*

The asterisks serve as wildcards and tell Chrome to allow notifications from any site starting with the path you entered.

Grid View Click the “Site Settings” option under the “Privacy and security” header.

Find the switch where it says “Ask before sending” and toggle it off.

You have now blocked all notifications.

To whitelist a site, look for the list under “Allow,” click on “Add” and then type in the URL.

Stop notifications in Firefox

Click the three-line menu icon in the browser’s upper-right corner and select “Options.”

Click “Privacy & Security” in the menu at the left.

Scroll down to the “Permissions” section and click the “Settings” button next to “Notifications.”

Check the box next to “Block new requests asking to allow notifications.”

If you want to remove any websites you’ve already authorized for notification delivery, click them in the list on that same screen and then click the “Remove Website” button. You can also click the “Remove All Websites” button to eliminate all whitelisted sites at once. (If you don’t see any sites in the list and the buttons are grayed out, that means you haven’t given any websites the green light to notify you.)

Firefox doesn’t provide any way to add sites as exceptions from its settings section, so if you want to whitelist any websites, you’ll have to leave the notification permission active and then go visit those sites individually to get them to prompt you. You can then approve the requests one at a time and then go back to disable the notification permission once you’re done.

Grid View Scroll down to the “Permissions” section and click the “Settings” button next to “Notifications.”

Check the box next to “Block new requests asking to allow notifications.”

Stop notifications in Safari

Go to Safari > Preferences using the top menu bar

Click on Websites

Click on Notifications in the left-hand menu

Any websites that have asked for permission to show alerts will be listed. You can go down the list and choose to allow or deny any or all of them.

You can also uncheck “Allow websites to ask for permission to send push notifications” at the bottom of the window.

You can also mute all notifications from Safari (and from other apps besides), by going to the Notification Center of your Mac:

Go to your System Preferences…

Click on Notifications

Find Safari in the list on the left and select it.

Under “Safari alert style:” select “None.” This will only affect the banners that appear when you get a notification

Uncheck any (or all) of the following: “Show notifications on lock screen,” “Show in Notification Center,” “Badge app icon,” and “Play sound for notifications.”

If you want to silence your system temporarily, you can select “Do Not Disturb” on the the top of the left-hand list and then filling in the time or circumstance when you want to silence all notifications.

Grid View Selection “Notifications” from the Safari “Preferences...” menu.

Uncheck “Allow websites to ask for permission to send push notifications.”

Alternative: select “Notifications” in your Mac’s “System Preferences...”

Scroll to “Safari” and tweak your notification settings.

You can also temporarily mute notifications using the “Do Not Disturb” setting.