Skip to main content
Ben Nadel at Angular 2 Master Class (New York, NY) with: Christoph Burgdorf
Ben Nadel at Angular 2 Master Class (New York, NY) with: Christoph Burgdorf ( @cburgdorf )

Adding My Blog As A Custom Search Engine In Google Chrome's OmniBox

By on
Tags:

I've been blogging for quite a while now. And, as much as I try to, I simply can't keep all of it in my head. In fact, that's one of the major benefits of blogging - being able to create a sort-of "scratch disk" for my tiny caveman brain. So, I often find myself searching my own blog archive for examples and code-snippets that I want to use in my work. Normally, I do this by adding site:bennadel.com before my Google search; however, I recently learned that I could make this even easier by adding my own Blog as a custom search engine in Google Chrome's OmniBox.

Ultimately, what this allows me to do is type ben in the Google Chrome OmniBox (ie, Location / URL bar) before my search query, and narrow Google's search down to my site:

Google Chrome's OmniBox contrained to search through BenNadel.com blog.

To do this, I went into the my Chrome Settings - CMD+, - and went to the "Search Engines" section and clicked on "Manage Search Engines":

Google Chrome's settings for Search Engines.

This brings up a list of all the configured search engines, which are nothing more than a combination of keyword-triggers and resulting search strings. To add my own blog to this list, I clicked on Add and entered ben as the trigger:

Google Chrome's settings for a customized Search Engine for BenNadel.com.

Then, as the Search Engine URL, I entered:

https://www.google.com/search?q=site%3Abennadel.com+%s

This is, essentially, the search that I used to run with site:bennadel.com as the first part of the query term. In this URL, the %s will be replaced with the query that I enter in Google Chrome's OmniBox / Location Bar.

So now, if I want to search my own blog in Google Chrome, I simply do:

  • CMD+L - focuses the OmniBox / Location bar.
  • Type ben
  • Type Space or Tab - triggers the custom search engine context.
  • Type the rest of my query.
  • Hit Enter - executes the Google Search on site:bennadel.com.

I know this is a silly thing; but, honestly, it's a really nice micro-optimization. I do search my own site a lot looking for old posts and this will make it a seamless gesture. And, of course, you could set up any site as the context for a constrained search. For example, I just added the Mozilla Developer Network to trigger with mdn and run a query for:

https://www.google.com/search?q=site%3Adeveloper.mozilla.org+%s

Now, if I search for something like mdn ClipboardEvent, it will constrain my resulting search to the Mozilla Developer site. Which, let's face it, is like 50% of all my queries.

Reader Comments

1 Comments

This. Is. Insane. I slapped my forehad... I did know this feature existed. I did have this problem of searching the docs for a handful of libraries all the time. It did physically hurt to see Google results page every time. And yet I was mindlessly suffering until you brought light into my life.

15,688 Comments

@Somiandras,

Ha ha, glad to have shed some light. I am loving this feature. I've already used mdn xxxx like 15-times since I posted this :D

5 Comments

I tried to search something on your page and couldn't find any dedicated page. So I used google search to restrict it your website. Which lead me to this article.

I also use the search page of my website when I need to search. But now I found out that it's much easier to add Search Engine entry. May be this is the reason you don't have a dedicated search page.

15,688 Comments

@Samiullah,

I used to have a dedicated search. But, it was nowhere near as good as what Google offered since I was basically just using LIKE in the database to do the searching. Google is so much more robust.

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel