The other day, I was browsing through Quora and I came across something interesting. The question was ‘Is there a way to search multiple websites at once?’ I gave an answer there and left it alone for a while only to be surprised by the attention that it was getting! So I decided to write this post detailing the entire process a little more.
Using Google custom search
Using Google custom search, you will be able to search multiple websites, however this number is limited to 10. (understandable, since If Google allowed unlimited websites, it will be easier to launch a Google alternative.
- Sign in to Control Panel using your Google Account (get an account if you don’t have one).
- In the Sites to search section, add the pages you want to include in your search engine. You can include any sites you want, not just the sites you own. You can include whole site URLs or individual pages URLs. You can also use URL patterns. Here go to add and click on ” add sites in bulk.
- The name of your search engine will be automatically generated based on the URLs you select. You can change this name at any time.
- Select the language of your search engine. This defines the language of the buttons and other design elements of your search engine but doesn’t affect the actual search results.
- Click Create.
Your basic search engine is ready to use! To see more configuration options, go to the Control Panel. Control Panel also has a preview window that allows you to test and fine-tune your search results.
Add a Duckduckgo search box to your website using the code below that searches multiple websites.
<iframe src="https://duckduckgo.com/search.html?prefill=Search DuckDuckGo" style="overflow:hidden;margin:0;padding:0;width:408px;height:40px;" frameborder="0"></iframe> Enter other details like - width, logo on or off, background color, pre fill, autofocus on or off,
Under site search, enter the website URLs separated by commas. If you have the list of websites in an excel sheet in separate rows, use the concatenate function to append a comma to every URL.
Not searching multiple search engines at once
Now, that question in itself was not very clear. But with a little thought, I could narrow it down to have two meanings. This post isn’t about searching in multiples search engines at once but rather about:
- Search for a keyword (on Google) but limit the results to a few websites alone. This is about stringing together the ‘site:’ operator in Google to search specific sites only.
- Make a search bar on your website where you or other people can search for the content of one or more websites. In this case, you want the results to be displayed in a single page rather than firing multiple searches on different websites.
The first one is a more general case and is fairly easy to do. The second, however, requires a bit more professional implementation. I did a little digging and found that this is not as uncommon a problem as I had initially anticipated. I came across cases looking to search multiple websites for a keyword or even search multiple domains for a keyword. It sure looked like a lot of people wanted to search inside a list of websites and hence I decided to write this article. The solutions mentioned here doesn’t involve any coding and can be easily done by someone who is not very tech-savvy.
Using the OR operator inside Google search
To search on Google and limit the results to some websites follow the steps below:
- Go to Google and type your search as usual.
- Before firing the search, add site:site1 OR site:site2, etc as many sites as you want.
- Now do the search and see that the results have now been limited to site1 and site2.
- For example, if you want to search for ‘phone’ on Amazon and Ebay (I don’t know why you would want that but still), use this search query: phone site:amazon.com OR site:ebay.com
You can extend this to have as many websites as you want.
Expertrec adds a Google like search box to your website using which you can search multiple websites.. It is priced at 9 USD per month. The biggest advantage is that it doesn’t contain ads.
Before starting out to make a custom search engine using expertrec, make sure that is your website is live and not behind a login (If your website is behind a login, follow steps in this blog). Have your sitemap URL handily. Also, make sure you have code access to your website. Follow the below steps
- Go to https://cse.expertrec.com/?platform=cse.
- Login with your Gmail id.
- Enter your website URL. (enter your website URL in the format https://www.yourwebsite.som).
- Enter your sitemap URL. ( if you don’t have a sitemap, you can skip this step as well).
- Go to Crawl->What to crawl->URLs to add more URLs
- Here you can add as many URLs as you like
- Initiate a website crawl. (Now expertrec crawlers will start crawling your website . This could take some time depending on the size and number of pages on your website).
- Once the crawl completes, you can make changes to your search engine’s look and feel and also to the search engine’s ranking algorithm by using the control panel. There are more advanced features like search weights, promotions, synonyms, and more.
- Go to the code section and add it to your website. You can also email the code to your developer and ask them to add it to their website
- the code contains two portions ( one within <script></script> and another piece of code <ci-search></ci-search>).
- The <ci-search></ci-search> code adds the search box to your website. The place where you add this code determines the location of the search box.
- It is advisable to make the code changes in a test mode or development website before taking live in your live/ production site.
- As a final step, remove any website cache that you might have.
- Now your site search engine is live. You can check out the search analytics after a few days of search engine usage to check out what users are search for and reorganize your content strategy accordingly.
Now this search bar will have the capability to limit the search to a few websites and you will be in full control of this. You can mention a list of websites and limit your search to just these domains easily using this method. It will search across these websites simultaneously and return the results to a single page with a single keystroke. This page and the search behavior is entirely customizable and that is just one of the added benefits!
Advantages of Using Expertrec for searching multiple sites
- No Ads. We never show ads in our search results.
- Affordable pricing plan. – We have prices starting at $9 per month.
- Real-time support to help you take live your search on your website- You can be sure that search results don’t
- Full control over search results.
Using Yandex site search
In the first step, you define the search area (i.e., the set of pages covered by your search), search names, and other general properties.
Technical name of your search The name to be shown on the page. Only you will be able to see it.
Search name in the Opensearch standard You can enter a search name for OpenSearch. This is the name your visitors can use to add your search as a browser search engine.
Family filter To exclude pages containing obscenities and pornography from the search area, set up a family filter. The filter settings are similar to the corresponding big search settings.
Search area Specify the search area, i.e., a list of sites to include in the search. You can specify up to 50 addresses of sites or their sections.
Click Add sites and exclusions List the addresses of sites or their subsections space-separated.
Search Form -In the second step, you configure your search form design. Its settings are shown automatically under Search form preview: here you can see how your form will look on the site page. Please note: on your site, however, the form will automatically stretch to the available width.
Search results In the third step, you configure the search results. The most important thing is to decide where you would like to display your search results (Display results section).
You have two options:
- In the Yandex page, with your logo, title, and footer (Show results at Yandex option).
- In your site page (Show results at your own page option). If you selected this option, specify the URL of the page to contain the search results code. The code is available in the last step of search creation.
Your design settings for search results (colors, text formatting, font styles) are automatically shown under Search results preview.
Code for your site In the fifth step, you get the code for the search form and search results (if you wish to display search results on your site).
Selecting encoding and language Yandex automatically detects the site encoding, but if the automatic detection fails, you can specify your text encoding manually.
The language selection affects several search parameters The language of search results and search form.
Search form code Having selected the search form language, you can copy its code and paste it to the HTML code of your site page.
Yandex Site Search form code is put inside a <div> element along with its CSS classes. You can customize the form’s design, if needed: put the new CSS styles in the <style> element after the form code.
Search results code If you selected Show results at your own page in the search results settings, the search result code will also be shown in the fifth step. Paste this code into the HTML code of your page for search results.
Yandex Site Search provides two formats of the search results code:
- IFRAME – The simplest option — the inserted code creates an <iframe> element with the results. This option is better compatible with complex website layouts but is less flexible regarding search result design.
- HTML & CSS – In this case, the HTML code of search results becomes an integral part of your page structure. Now your common CSS styles define the design of your search results.
If you know CSS, you can adapt the search results to your site design. Select the option Add CSS to results code to add all the search result CSS styles to the results code.
The HTML & CSS option also allows getting links to a specific search results page or search results with constraints. To use this feature, select the option Edit webpage hash settings when browsing search results.
You can opt for other services. I recommended this one as I have used and am confident in. Others that I found online are SearchAll and Auto Hotkey, which let you search within specific websites.