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.
Go to the Settings application and select General and then Software Update.
Video of the Day
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.
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.
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.
Prevent Safari Redirects in OS X Yosemite
Check 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
Click Safari in the menu bar while within the app and select Preferences. Select the Privacy tab in the Preferences window.
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.