I wrote a script to find the position in Google search result for a search keyword. I also did the same with the browser. The two results are different.
Let me explain in detail here. I have a website and I wanted to know on which page number my domain appears for a search string. Like when I search for 'code snippets' I wanted to find in Google search on which page number a certain domain appears.
I wrote a PHP script to search page by page starting from page 1 to page n. Then I did the same task using a browser. The script returned page 4 and when browsed I can see the domain appearing on the second page.
Here is the search string I used in my code.
/search?hl=en&output=search&sclient=psy-ab&q=code+snippets&start=0&btnG=
For each request I change the start=0
to start=1
, start=2
, etc.,
and in the response I will check whether my domain appears in it.
Any idea why this is different in search results?