How to block pop-ups in Safari browser
Pop-ups can be ads, notices, offers, or other alerts that open over or under your browser window, in another tab, or in your current window. Some pop-ups use phishing tactics—like warnings or prizes—to trick you into believing they’re from Apple or another trusted company, so you’ll share personal or financial information. Others might claim to offer free downloads, software updates, or plugins, to try to trick you into installing unwanted software.
Unless you’re confident of an ad’s legitimacy, you should avoid interacting with pop-ups or webpages that seem to take over your screen. Here are additional tips that can help you manage pop-ups and other unwanted interruptions.
Check and update your software
Always make sure you install the latest software updates for all your Apple products. Many software releases have important security updates and may include improvements that help control pop-ups.
The safest place to download apps for your Mac is the Mac App Store. If you need third-party software for your Mac, and it isn’t available in the App Store, get it directly from the developer or another reliable source, rather than through an ad or link.
Check Safari settings and security preferences
Make sure Safari security settings are turned on, particularly Block Pop-ups and Fraudulent Website Warning.
On your iPhone, iPad, or iPod touch, go to Settings > Safari and turn on Block Pop-ups and Fraudulent Website Warning.
On your Mac you can find these same options in the Security tab of Safari preferences. You can also click the Extensions tab in Safari preferences to check if you have any extensions installed that you prefer to turn off.
Pop-ups and ads in Safari
If you see an annoying pop-up in Safari, you can go to the Search field and enter a new URL or search term to browse to a new site. If you don’t see the Search field on your iPhone, iPad, or iPod touch, tap the top of the screen to make it appear.
Some popups and ads have fake buttons that resemble the close button, so use caution if you try to close a pop-up or ad. If you’re unsure, avoid interacting with the popup or ad and close the Safari window or tab.
If you might have installed adware or other unwanted software on your Mac
If you see pop-ups on your Mac that just won’t go away, you might have inadvertently downloaded and installed adware (advertising-supported software) or other unwanted software. Certain third-party download sites might include programs that you don’t want with the software that you install.
If you think that you might have malware or adware on your Mac, update to the latest version of macOS. If your Mac is already running the latest version, restart it. macOS includes a built-in tool that removes known malware when you restart your Mac.
Check your Applications folder to see if you have any apps that you didn’t expect and uninstall them. If you continue to see advertising or other unwanted programs on your Mac, contact Apple.
Information about products not manufactured by Apple, or independent websites not controlled or tested by Apple, is provided without recommendation or endorsement. Apple assumes no responsibility with regard to the selection, performance, or use of third-party websites or products. Apple makes no representations regarding third-party website accuracy or reliability. Risks are inherent in the use of the Internet. Contact the vendor for additional information. Other company and product names may be trademarks of their respective owners.
source: Apple support