How to Replicate DuckDuckGo Bangs in Firefox
I finally made the switch from Chrome to Firefox (thanks to uBlock Origin drama). If you still get ads when watching YouTube with uBlock Origin, you might have read that recent news where uBlock Origin is now forcefully disabled by Chrome.
While I still occasionally get force-fed with ads on YouTube and Gmail on Chrome, so far it's been bearable. But, I know that eventually things will actually stop working and I'll have to watch YouTube's unskippable ads.
Why I Finally Made the Switch
This wasn't the first time I attempted a browser switch. As mentioned in my previous post, I really like DuckDuckGo's Bangs feature. My previous attempts at switching browsers failed because this feature was missing from other browsers. As of recent months, I got to learn that I was able to replicate the DuckDuckGo bang thing on Firefox now!
Also, I recently bought a new MacBook Air 15" with the M4 chip after using my old Dell XPS 13 for a good 5 years+ with WSL2 for development. I figured, heck, if I were to make the switch from Google Chrome to Firefox, now is the time.
How to Add Custom Search Shortcuts in Firefox
Adding the search shortcut was quite easy.
Step 1: Enable the Feature in about:config
Make sure to go to about:config in your Firefox address bar to set browser.urlbar.update2.engineAliasRefresh to true.
This makes the "Add" button appear — otherwise, you can't add custom search shortcuts.

browser.urlbar.update2.engineAliasRefresh setting first.Step 2: Add Your Custom Shortcuts
Navigate to about:preferences#search and click the "Add" button to create your custom search shortcuts.
After that, just add whatever you want. For example, my favorite was !r to append site:reddit.com to my Google search to look for answers from Reddit only.

The Result

That's all! Now I can finally browse without constantly battling Chrome's anti-adblock changes while still keeping my beloved search shortcuts. The switch feels good so far, and I'm honestly wondering why I waited this long to make the move.
My Search Shortcuts
| Search Engine | Keyword | Engine URL |
|---|---|---|
| !r | https://www.google.com/search?q=site:reddit.com+%s | |
| Phind | !p | https://www.phind.com/search?q=%s |
| YouTube | !yt | https://www.youtube.com/results?search_query=%s |
| GitHub | !gh | https://github.com/search?q=%s |
| Hacker News | !hn | https://www.google.com/search?q=site:news.ycombinator.com+%s |
| Stack Overflow | !so | https://www.google.com/search?q=site:stackoverflow.com+%s |
| Sourcegraph | !sg | https://sourcegraph.com/search?q=context:global+%s |
| Perplexity | !pl | https://www.perplexity.ai/search?q=%s |
Note: %s represents the search query placeholder that gets replaced with your actual search terms.