Creating and configuring search

In the five steps of creating a search, you configure the search area, as well as the design of the search form and search results. As a result, you get the HTML code and can insert it on your site.

Step 1. Search area

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.

If you created a search before Yandex Site Search started supporting OpenSearch, it was automatically assigned the name, e.g., “Yandex Site Search #2023403”. We recommend that you change it to better reflect your search focus.

Family filter

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.

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

Note. Your search topics will only work for earlier created searches. Categories and topics are no longer available for new searches.
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.
  1. Click Add sites and exclusions.

  2. List the addresses of sites or their subsections space-separated.

  3. Configure exclusions.

  4. Click Add.

Search in subdomains

By default, the search is run on all the listed addresses and their subdomains. For example, if you add, is also in the search area. To exclude subdomains, slide to .


You can exclude specific pages from the search area. Exclusions apply to the entire search area including the search topics.

In the exclusion list, you can specify the exact document addresses or their masks to exclude whole site sections. For example:

  • Exclude somepage.php on

  • Exclude all pages from the /blog/ section on

If you have already specified a site manually, you can add or remove exclusions using the Exclusions section, just as you do it for sites.

If your search area consists only of search topics, you can add exclusions by clicking Add sites and exclusions.

Step 2. 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.


A transparent form background is suggested by default so you don't have to select the form color matching your site's color scheme.

The code of the resulting form is available in the last step of search creation.

Step 3. 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.

Step 4. Checking your search

In the fourth step, you can check the search you have set up. The form design must match your configured parameters and search results must not get outside the specified search area.

If the search or form doesn't work as you expected, double check the settings you made in the previous steps. If the error persists, write to us, specifying your username and name of the faulty search.

Step 5. 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 area and result ranking (the query entered in an English form is more likely to return pages in English).
  • The language of search suggestions generated by default.

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:


    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.

    Restriction. If you use your own hash parameters, this setting may get in conflict with the search results code. We recommend that you disable this option in this case.


The search you have created appears in the list. When you open the search page, you can change all the parameters set at creation and configure the search suggestions, snippets, and constraints.