You click a link while browsing the Web in Safari and, all of the sudden, the App Store pops up displaying what seems to be a random app. What happened? Clicking on the wrong spot can cause a redirect, which is preventable in Safari for iOS 8 for iPhone, iPad and iPod Touch as well as Safari for OS X Yosemite for Mac.
Prevent Safari Redirects in iOS 8
Update to Latest iOS
Preventing redirects in iOS is as simple as updating to the latest iOS version.
Step 1: Check if There Is an Available Update
Go to the Settings application and select General and then Software Update.
Step 2: Download and Install the Update
If there is an update available, click Install Now to download and install it. IOS 8 includes security fixes meant to disable redirects from occurring in Safari.
Check Safari Settings
Change Safari settings to prevent redirects.
Step 1: Block Pop-Ups and Disable Website Tracking
Open Settings, scroll down and select Safari. Within the General section, make sure the Block Pop-ups option is toggled on. Under Privacy & Security, enable the Do Not Track and Fraudulent Website Warning options.
Step 2: Block Cookies
Click the Block Cookies option within Safari settings. Set the option to either Always Block or Allow from Websites I Visit, which may prevent redirects as you browse the Web.
Note: Blocking cookies may affect certain websites' functionality. Cookies are used to save login info and customization options as well as power features such as an e-commerce site's product suggestions.
Prevent Safari Redirects in OS X Yosemite
Check Safari Security Preferences
Step 1: Open Safari Security Preferences
Click Safari in the menu bar while within the app and select Preferences. In the Preferences window, select the Security tab.
Check Safari Privacy Preferences
Step 1: Open Safari Privacy Preferences
Click Safari in the menu bar while within the app and select Preferences. Select the Privacy tab in the Preferences window.
Step 2: Block Cookies and Disable Website Tracking
Check the Ask websites not to track me option. As with iOS, selecting Always block or Allow from website I visit under the Cookies and website data section may prevent redirects, but can also affect features of websites such as auto-login and suggested products.