Can I "Feel Lucky" at a particular site?
May 5, 2008 11:20 AM Subscribe
Does anyone know how to combine sitesearch and Feeling Lucky in google URLs?
I'm trying to create a search string that will search MSDN for a particular keyword and take me to the first match. The following URL does what I want (from this old ask.mefi), except it won't limit the search to a particular domain:
http://www.google.com/search?hl=en&btnI=Feeling+Lucky&q=strlen
If I add a site to the query string, though, it no longer behaves like the "I'm Feeling Lucky" button. Instead, it shows a list of matches:
http://www.google.com/search?hl=en&as_sitesearch=msdn.microsoft.com&btnI=Feeling+Lucky&q=strlen
Is what I'm doing impossible?
I'm trying to create a search string that will search MSDN for a particular keyword and take me to the first match. The following URL does what I want (from this old ask.mefi), except it won't limit the search to a particular domain:
http://www.google.com/search?hl=en&btnI=Feeling+Lucky&q=strlen
If I add a site to the query string, though, it no longer behaves like the "I'm Feeling Lucky" button. Instead, it shows a list of matches:
http://www.google.com/search?hl=en&as_sitesearch=msdn.microsoft.com&btnI=Feeling+Lucky&q=strlen
Is what I'm doing impossible?
OK I think that whats happening here is the page listed in the Google index is being redirected to another page, either because it's 404 or because the page has moved. Google must be detecting that and canceling the 'Lucky' feature.
e.g. Searching ibm.com for strlen the first result is this but the page then redirects to here
Searching cplusplus.com for strlen the first result is still a valid page so the feeling lucky option works as you'd expect.
posted by Lanark at 2:51 PM on May 5, 2008
e.g. Searching ibm.com for strlen the first result is this but the page then redirects to here
Searching cplusplus.com for strlen the first result is still a valid page so the feeling lucky option works as you'd expect.
posted by Lanark at 2:51 PM on May 5, 2008
This thread is closed to new comments.
It works by passing 3 parameters:
&site:whatever.com
&q=YourQueryString
&btnI=I'm+Feeling+Lucky
posted by Lanark at 1:17 PM on May 5, 2008