I
I
I'm Yoda2019-04-01 14:30:10
1C-Bitrix
I'm Yoda, 2019-04-01 14:30:10

How to make Yandex/Google bots see text added using preg_replace?

Hello connoisseurs!
I made an SEO module for my own site to change titles, etc., and also added the ability to insert text on the page through preg_replace. The point is that on the desired page, in a random place, we insert a comment and instead of it, the text added to ib is displayed on the page. Everything is displayed on the client (title, keywords, description, h1 and the desired text is displayed in place of the comment. The problem is that for some reason Google / Yandex bots do not see this text, but title, keywords, description, h1 see it normally. Maybe someone Has anyone already done this and will help solve the problem.Maybe someone will give sensible advice? Thanks to all who responded! <!--text--><!--/text-->

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
I'm Yoda, 2019-04-01
@Anadi

Figured it out myself! Thanks everyone! Manual adaptation of the composite helped!

K
Kudis, 2019-04-01
@kudis

1. It is necessary to fill in this data through deferred functions. Off.documentation
2. Add OpenGraph markup to the standard ones. Forum
3. If you are using your own components, then make sure that the properties are changed outside the cache.
If you do everything right, Yandex with a buzz will be happy to show everything correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question