Search the site through Google and Yandex. Site Search Script

The more your resource is updated with new information, the faster you will need to enter a structured, convenient search. There are several options for how to do this. The first method suggests using the built-in tools of your CMS. The second is suitable for those who work on pure HTML - for this, a special script for searching the HTML site is written. And the third option, the most convenient, proven and, most importantly, suitable for any sites, is to search the site through the search engines Google or Yandex. What are they and how are they created?

site search

Search Features Through Search Engines

There are several reasonable reasons for using a site search through Yandex or Google:

  • The first point is that these are specialized search engines, which means that their algorithms should be trusted.
  • Secondly, the search engine gives hints, which means that it will be easier for the user to formulate his question and find what is needed. The same principle takes into account spelling errors in words or a randomly switched keyboard. The usual HTML site search form will not take this into account, and the search will not be found.
  • The third important aspect is statistics. When querying in Wordstat, Yandex gives us the frequency of a particular search query. According to these data, we know what keys to use when filling the site with texts, and we can also analyze what the user is looking for, what is in demand, and what is not, what can be offered to a potential buyer, etc.

site search script

Among these indisputable advantages, there is one caveat. Updated information will be available to the user only after the search robot indexes the content. Until the search “spider” reaches it, the user cannot find it on the site. Such indexing, depending on the position of the resource on the search ladder, can take quite a long time, up to several days.

Search for Yandex website

The Russian-speaking giant Yandex offers website developers their own free search integration tool. It is quite comfortable. In addition to taking into account the morphological features of the language - error correction, typos, site search through "Yandex" allows you to specify a list of synonyms for each word and add a drop-down line of prompts. This will allow the user to be more likely to find what he needed.

The settings of this tool are very simple, you can choose all the necessary parameters yourself. Plus, the tool has flexible settings for the appearance and search elements, which will make it possible to design it in corporate colors and website style.

It is possible to search not only text, but also images.

And the last, but no less important feature. Using the search on the Yandex website, you are automatically more often ranked by the system, which allows you to advance faster in TOP queries.

how to do a site search in php and html

How to set up a Yandex search

Everything is simple, the main thing is that your site be added to Yandex.Webmaster. It is easy to do.

You need to go to “Yandex. Search on the site ”and click“ Install Search ”. Then fill in all the data that the system requires of you, including the name of the resource, e-mail and search requirements. There are clues in the form, so figuring out where to check the boxes is easy.

Then, the search appearance settings are made, it is indicated on which page it will be displayed. For better orientation, a preview has been added.

The next step is to check if the search works.

And if everything suits you, add it to your site by copying the service code.

Google Search

Unlike the Yandex search engine, site search through Google is a paid tool. But despite this, it is in great demand, especially among those who are trying to promote their resource in the TOP through this search engine. So, here's what a webmaster gets for an average cost of about $ 100 a year:

  • completely personalized appearance, including the ability to remove the Google logo and put your own, change the color, style, shape;
  • the ability to search in any language;
  • Changing the order in which results are displayed as you see fit;
  • search with synonymizers, which allows you to quickly find the user what he was looking for, even if the request was not formulated as indicated on the site;
  • indexing on demand, that is, for any update you have the right to send a request to the robot, and it will be indexed in a matter of minutes;
  • the ability to search across multiple sites;
  • tracking statistics;
  • earnings on advertising.

Search a site via google

How to set up a search on Google

To install it on the site, you must go to the "Google Custom Search Engine", and then fill out the standard form. It is similar to the description in the chapter on Yandex. Next, you can select the styles for the search line, colors, fonts, etc. And then copy the generated code and paste into the body of the page where the search should be displayed.

html site search form

Finally

For those who don’t know how to search the site in PHP and HTML, they don’t understand the intricacies of web programming and want to get a quick, convenient, and most importantly, effective way to search for information, it is best to use special scripts from Yandex and Google . They are not only more adapted to this function, but also help to effectively promote the resource in the TOP queries. The main thing here is to determine where you would like to see yourself higher - in the free Yandex or Google, where you have to pay, but where there are great opportunities. For example, the ability to instantly index updated materials.

Source: https://habr.com/ru/post/C32559/


All Articles