How to prevent particular website(s) from showing up in search results when using address bar

Hey all, beginner question here.

I am wanting to prevent links from several major tech platforms (e.g. Reddit, Twitter) from showing up in search results when using Mojeek.

Currently I am able to make the address bar use Mojeek - I just haven’t found a way to prevent particular websites from showing up when doing so. I also know you can switch to using a Focus once you make your search, but I’m hoping for something that uses fewer keystrokes/clicks. Perhaps there’s a way to set a default Focus?

I have already found a solution for my browser homepage but looking for a solution specifically for the address bar as that’s what I use most.

Am currently using Firefox but open to trying other browsers.

Any help would be appreciated!

3 Likes

Hello and welcome @Sanguine :wave:

Providing this is not more than 25, you can do this by constructing a Focus using these sites in the Exclude box, and then use this method to add that Focus as a new search engine in your browser: How To Use Focus From Your URL Bar | Mojeek Blog

These individual Focuses could be triggered using the keyword searching method, which normally means pressing a key (or a few keys if you need) then space to tell your browser you want to search using that particular engine.

Let me know if any of that isn’t clear or working.

2 Likes

hi @Sanguine - this is not at all relevant to your question, but since you mentioned…

if you’re a privacy advocate, and i suspect many Mojeek-ers are, then i wouldn’t recommend deviating from Firefox

i’m not a Firefox fanboy and certainly not a fan of some of the things Mozilla is doing, but to my knowledge, Firefox outperforms every other mainstream browser with regard to privacy, though how far you want to take that is entirely up to you

at the very least i would recommend setting ETP to ‘strict’ (settings > privacy & security > enhanced tracking protection)

if you want to go to the next level you have 2 popular options that i’m aware of, the easy road being LibreWolf and the more comprehensive road being the arkenfox user.js (be sure to read their wiki if you go this route)

@Josh - this has been mentioned before (excluding domains), but perhaps it would be a useful option to add to the ‘Search Results’ options page whereby the user can add domains to exclude and perhaps list those domains in the search sidebar as a reminder with the option to re-do the search without the domains excluded

2 Likes

Thanks! I was aware of this method already (perhaps I should have mentioned), but it is good to keep in mind. Perhaps I am being lazy but I do worry that having to type a few extra keystrokes (especially after being ingrained with the habit of going to my search bar and immediately typing what I want to search) is something I am going to casually get tired of after months, years, etc. and then I will be back to seeing links from websites/platforms that I am trying to cut out of my life completely. But I’ll consider my options and I do appreciate the response.

Thank you for the recommendations! I definitely will consider these other options as well. My only concern is that fewer extensions/addons will be available but I suppose that’s something to look into.

going with the arkenfox user.js or LibreWolf (basically Firefox with some scripts run on it) doesn’t limit the number of available add-ons - the entire AMO repository is still available - but that said, the fewer number of add-ons you install, the better, and every extension should be carefully considered because there’s a ton of malware on AMO (as well as the google chrome repository), ‘malware’ being tracking, “free” services, data collection, etc.

if you want my personal not-very-techy advice on how to vet an add-on, try this

If you Show the Focus widgets on search results page then the light bulbs there will allow you to modify an existing custom Focus.

To redo the search without the exclusions, click on the “Web” tab to perform a standard web search.

You can find the excluded domains in the Focus settings.

1 Like

If you’re looking to cut these websites out completely then the version of Mojeek you have with these exclusions could be your default search.

You can follow these step-by-step instructions to add a Mojeek Focus to your browser’s address bar.

Since Sanguine asked to exclude websites from their search results and to use a customized Focus search engine by default, I’ve demonstrated those options below.

Make a List of Websites to Exclude

Start by making a list of websites that you intend to exclude.

.x.com
.twitter.com
.reddit.com

I could be mistaken but the leading dot should include subdomains like blog.x.com This convention applies to Mojeek preferences. This is the appropriate format when we add these domains to the Exceptions list later.

Turn on Mojeek Focus

Visit the Focus Dashboard

Turn on the “Results page” and “Search bar” options by clicking on the slider icons. Below, we see the options turned on.

Screen capture of the Focus settings.

Note that this and subsequent steps will create cookies for mojeek.com in your browser. The cookies will be required to retain these search preferences and, later, the sites for your Focus.

Create a New Focus

On the Focus Dashboard, click on the “Create new” button.

On the resulting Edit Focus page, fill in the Focus name at the top. And, fill in the sites to exclude in the Exceptions field. Exceptions is the third box from the top.

Click the Save button.

Copy the Focus URL

We’ll need the web address for your Focus in the next step. So, let’s make a copy of the address.

Begin by performing any web search.

Click on the Focus tab above the search results, and then click on your Focus (e.g., “Sanguine Example”) in the drop-down menu.

After navigating to your Focus search results, copy the URL from the address bar.

In my example, the resulting URL is:

https://www.mojeek.com/search?q=fedora+bluefin&foc=Sanguine%2BExample

Modify the Focus URL

The URL should be modified to work with your browser’s search settings. Typically, this means replacing your keywords with the %s token.

For example, here is a modified version of my Focus where fedora+bluefin has been replaced with %s:

https://www.mojeek.com/search?q=%s&foc=Sanguine%2BExample

Note the ampersand is part of the Focus parameter and should be left in:

&foc=Sanguine%2BExample

Change the Firefox Preferences to Add a Custom Search Engine

By default, Firefox will not show the Add button in its search preferences.

Let’s turn on the button.

Start by visiting the special URL about:config

And, click on the button to accept the risk and continue to the advanced preferences page.

From the advanced preferences page, you’ll be able to search or create advanced preferences.

The relevant preference for the Add button is:

browser.urlbar.update2.engineAliasRefresh

Copy this preference string into the Advanced Preferences search box.

If there are no matches then Firefox will propose a new advanced preference in the search results area.

Make sure to to select Boolean from among the available data types.

Click the plus + button to create a new advanced preference.

Make sure the value of your new preference is set to true (shown below).

The finished preference should look like the following:

Add the Focus as a Search Engine in Firefox

Visit the Search Shortcuts section within Firefox Settings.

Note the Add button should be showing below the Search Shortcuts section. If not then refresh the page after making the changes from the last step.

Click the Add button, and fill out the resulting Add Search Engine form.

This form can be used to add a new search engine. Here, I've filled in example values.

For example, in Firefox, I used the values:

Search engine name: Sanguine Example

Engine URL: https://www.mojeek.com/search?q=%s&foc=Sanguine%2BExample

Alias: se

Click the Add Engine button to save your changes.

Back at Search Shortcuts, your new search engine will appear below any existing search engines.

Set the Default Search Engine

You can set the default search engine in Firefox.

Navigate to the top of the Search settings page in Firefox. You should be able to see the Default Search Engine section.

Click on the drop-down menu and select your new search engine.

Clicking on the new search engine saves the change.

Close-up of the Default Search Engine menu with the new search engine showing.


Search in the Address Bar

After setting up the Focus search engine in your browser, type the search engine alias in the address bar to trigger the new search.

For example, I input the alias se in the last step. So, now, I can type se to trigger my Focus. Then, I enter my keywords as usual.

Note you will need to add a space between your alias and keywords.

Note that once you type the alias, Firefox will replace it with a visual tag for your search engine. In the screen capture above, the tag in the address bar reads “Sanguine Example”.

Alternatively, you can click on the nondescript magnifying glass favicon where the address bar shows other search engines. (I’m not sure how to customize that icon.)

Now, searching with that alias will automatically take you to your Focus results.

Note if you chose a default search engine then typing the alias is not required.

Troubleshooting

These steps work for Firefox on the desktop. Someone will have to comment on any additional steps for mobile.

Similar steps can be taken in Google Chrome. Chrome should be able to add a search engine without setting any advanced preferences.

These settings depend on saving cookies for mojeek.com So, if you clear your cookies then the Focus preferences and domain list will be erased.

The upper limit for any individual Focus is twenty-five websites. So, you can’t include/exclude more than twenty-five sites with the current version of Focus.

6 Likes

I was going to write this up myself, but this is far more detailed and with more helpful screenshots than I would have bothered with.

:clap: , @mike

2 Likes

Better than if I turned it into a blogpost to be honest, thanks a lot @mike.

1 Like