Search code examples
google-search

Adding google search box to site: CSE vs a simple sitesearch parameter - Any down sites? Google policy issue?


The goal is to let users search a simple site using Google. I know of Google Custom Search Engine (CSE).

But it is also possible, and more simple, to just create a form that submits a query to Google. For example

<form action=https://www.google.com/search>
  <input type=text name=q>
  <input type=hidden name=sitesearch value=example.com>
  <input type=submit value=search>
</form>

The resulting search will look like some keywords site:example.com.

(The UX downsides are: User leaves the site. If a user wants to modify the search, they could get confused.)

Is there any technical downside to this? For example, will the results be basically the same?

Also, is there any Google policy against this?


Solution

  • But it is also possible, and more simple, to just create a form that submits a query to Google.

    Yes you can send them to google using this method.

    will the results be basically the same?

    That would be worth testing and is likely to depend on how much customizations you did if you used the Customer Search Engine. For instance, the google docs say...

    https://developers.google.com/custom-search/docs/overview#what_is_custom_search

    1. Create custom search engines that search across a specified collection of sites or pages
    2. Enable image search for your site
    3. Customize the look and feel of search results, including adding search-as-you-type autocompletions
    4. Add promotions to your search results
    5. Leverage structured data on your site to customize search results
    6. Associate your search engine with your Google AdSense account, so you make money whenever users click ads on your search results pages.

    Things like doing multi site search is laborious on Google. CSE is likely to simplify this. I think the main limitation would be it becomes harder to add features for your users ie sending them to Google to do a multi site search on your images would be an ugly query.

    I think the basic results would be the same or similar but that would require testing. Google is almost certainly using the context of the page you are in when searching. They can do this using referer links but that's less reliable.

    Is there any technical downside to this?

    Yes, There's technically the UX problem but you seem to be aware of that. The addition of the site:domain_name will confuse most of your users unless you're running a web development or google search forum :)

    You'll also lose the ability to find out what your users are searching for in subsequent searches ie, the user searches for something and you send them to google, after this any subsequent search you're not going to find out about. On some sites what the user is looking for is really important and used to improve the information architecture of the site. It can also be used to spot things you need on the site ie if you have a website about cars and everyone seems to be searching for 'insurance' then it might be an opportunity for you to add some pages on insurance, this could also lead to opportunities to monetize the pages.

    Also, is there any Google policy against this?

    No. There would only be a policy against it if you were doing something nefarious ie trying to use their search results and pass them off as your own. Sending people to the search page is good for Google.