Search on the site through Google and Yandex. site search script

Table of contents:

Search on the site through Google and Yandex. site search script
Search on the site through Google and Yandex. site search script
Anonim

The more your resource is updated with new information, the faster it will be necessary to introduce 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 search script is written on the HTML site. And the third option, the most convenient, proven and, most importantly, suitable for any sites, is a search on the site through the Google or Yandex search engines. What are they and how are they created?

site search
site search

Features of searching through search engines

There are several valid reasons to use the 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 he needs. By the same principle, spelling errors in words or an accidentally switched keyboard are taken into account. Plainthe HTML site search form will not take this into account, and the search will not be found.
  • The third important aspect is keeping statistics. When querying Wordstat, "Yandex" gives us the frequency of a particular search query. Based on this data, we know which 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
site search script

There is one nuance among these undeniable advantages. Updated information will be available to the user only after the search robot indexes the content. Until the search "spider" gets to it, the user will not be able to 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 the site "Yandex"

Russian-speaking giant Yandex is offering website developers its own free search integration tool. It's pretty comfortable. In addition to taking into account the morphological features of the language - correcting errors, typos, searching the site through "Yandex" allows you to specify a list of synonyms for each word and add a drop-down line of hints. This will make the user more likely to find what they were looking for.

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, whichwill allow you to design it in the corporate colors and style of the site.

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

And the last but not the least important feature. Using the search on the Yandex website, you are automatically ranked by the system more often, which allows you to move faster to the TOP requests.

how to search website in php and html
how to search website in php and html

How to install Yandex search

It's simple, the main thing is that your site is added to "Yandex. Webmaster". Make it easy.

You need to go to “Yandex. Site search” and click “Set search”. Next, fill in all the data that the system requires of you, including the name of the resource, e-mail and search requirements. The form has hints, so it's easy to figure out where to put the checkboxes.

Then, the appearance of the search is configured, it is indicated on which page it will be displayed. A preview has been added for better orientation.

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.

Search Google

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 to the TOP through this search engine. So here's what a webmaster will get for an average cost of around $100 a year:

  • fully personalized appearance, includingthe ability to remove the Google logo and put your own, change the color, style, shape;
  • the ability to search in any language;
  • change the order of the results as you see fit;
  • search with synonymizers, allowing the user to quickly find what he was looking for, even if the request was worded differently than indicated on the site;
  • indexing on demand, i.e. 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 from advertising.
Site search via google
Site search via google

How to set up Google search

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

html site search form
html site search form

In conclusion

For those who do not know how to search the site in PHP and HTML, do not understand the intricacies of web programming and want to get a fast, 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 whereyou would like to see yourself higher - in the free "Yandex" or in Google, where you have to pay, but where there are great opportunities. For example, the ability to instantly index updated materials.

Recommended: