A
A
Alexander Andreev2018-04-05 10:07:40
Google
Alexander Andreev, 2018-04-05 10:07:40

How can you hide content-blocking forms from search engines?

There are a number of site topics, such as "alcoholic products" requiring confirmation of the age of visitors. Those. when a person enters the site, he is shown a modal window blocking the viewing of content and informing him that in order to continue working with the site, he needs to confirm that he is 18 years old or more or he must leave the site. If the form is closed, then the visitor gets to the 404th page or some other stub. If the age is confirmed, then the variable "AgeConfirmed = true" is written to the user's session and the form is no longer displayed. The visitor works calmly with the site.
Now search engines see this form, even Google Webmaster took a screenshot of the site with an age verification form. We believe that because of it, the search robot collects data about the site incorrectly. How to make it so that the search engine does not see it?
I must say right away that they tried to use a function like this:

<?php function isBot(&$botname = ''){
  $bots = array(
      'rambler','googlebot','aport','yahoo','msnbot','turtle','mail.ru','omsktele',
      'yetibot','picsearch','sape.bot','sape_context','gigabot','snapbot','alexa.com',
      'megadownload.net','askpeter.info','igde.ru','ask.com','qwartabot','yanga.co.uk',
      'scoutjet','similarpages','oozbot','shrinktheweb.com','aboutusbot','followsite.com',
      'dataparksearch','google-sitemaps','appEngine-google','feedfetcher-google',
      'liveinternet.ru','xml-sitemaps.com','agama','metadatalabs.com','h1.hrn.ru',
      'googlealert.com','seo-rus.com','yaDirectBot','yandeG','yandex',
      'yandexSomething','Copyscape.com','AdsBot-Google','domaintools.com',
      'Nigma.ru','bing.com','dotnetdotcom'
  );
  foreach($bots as $bot)
    if(stripos($_SERVER['HTTP_USER_AGENT'], $bot) !== false){
      $botname = $bot;
      return true;
  }
  return false;
} ?>

and set the variable "AgeConfirmed = true", but search engines still see it.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
Lazy @BojackHorseman PHP, 2018-04-05
Tag

Now search engines see this form, even Google Webmaster took a screenshot of the site with an age verification form. We believe that because of it, the search robot collects data about the site incorrectly.

the bot analyzes the content, not the appearance

A
Artem, 2018-04-05
@proudmore

As soon as the search engines catch you giving different content to the bot and people, you will be punished with a downgrade in the search results, up to and including complete removal.

D
Denis, 2018-04-05
@sidni

Well, since you decided to make money on the simplest way, selling alcohol)))) then you have to measure yourself)))).
it seemed to me that all such "cunning" sites showed the original page for a fraction of a second, and when the page loaded (this time was enough to understand what the site was doing), it gives a popup that the content here is for people who have reached a certain age.
The essence of the above is that you do not change anything on the site, and when the page is loaded, make a pop-up on the whole screen, since search engines have some difficulties with JS, the bot will not see the pop-up, but only the content and, accordingly, it will be indexed normally, but what will happen no one is interested in the preview in the webmaster
UPD for displaying different content to the bot and people may be sanctioned

P
Pavel Chief, 2018-05-23
@RePaul

Everything is stupidly simple:
use cloaking (yes, it is forbidden)
Give users with useragent bots - one content
And everyone else - another

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question