iPhone safari search results showing “Error 404”

I noticed a weird behavior with my iPhone’s safari browser for the past few days. Whenever I use the google search on iPhone from safari, the results are listed just fine, but when I try to click on any of the results, I see a “Error 404” (page not found!) page. This happens with any links on google search results page. Have you noticed something similar and still trying to figure out how to fix it? then read on..

Well, like anybody else (or almost anybody else), I googled for the behavior hoping to find a solution as I thought it must be a pretty common thing and a lot of people already faced and fixed this issue, but to my surprise, I haven’t found a single result which helped me.. then again, it could be that I am sucking at my google skills lately. So anyway, after a few such encounters, I was determined to solve this problem. I also had google app installed on the phone, and noticed that the search results in the app were working just fine (I configured the google app to open results in the app itself instead of launching safari) and it was just the safari browser that was having this problem. When I see this error page, I noticed the URL was pretty long which was pointing to m.google.com with query parameters having the info to forward the request to the appropriate URL which seemed right to me, so I knew the browser was trying to reach the correct URL but for some reason the m.google.com was just responding with 404.

The settings screen for safari

Then it occurred to me, stop thinking like a geek web developer and think like a common tech aware person… so, I headed to the settings app and went on to the safari settings (see pic), and tried the “Clear History” and “Clear Cookies”. Didn’t want to clear cache as gmail had quite a bit of data cached and didn’t want clear it unless absolutely necessary. And that’s it, it solved the issue :)…. but I think “Clear Cookies” is what probably did it. So there it is folks, if you ever face the same problem, try that. Or if you know of a better solution or have more knowledge of why this happens in the first place, please let me know in the comments.