How to hide counters from google?

M2
Site user since 30.11.2008
Offline
88
55

Good afternoon!

On the website in my articles is the title of the text, and then a new line counters are views, and then a new line content. Estestevenno all separated h1 and div-s as it should be. The problem is that the issuance of Google outputs pages with these counters, well, for example:

Read a book....

Views 105, published 01/01/2019, the book can be read .....

How to hide these counters from google that he did not indexed? Javascript does not work like they say

skybee
Site user since 16.12.2009
Offline
123
#1

It seems it should work:


<? Php if (preg_match ( "/ Googlebot / i", $ _SERVER [ 'HTTP_USER_AGENT']) === false):?>
<! - here html code counter ->
<Php endif?; ?>
P
Site user since 27.10.2014
Offline
186
#2

MAVZ2, here at cha damn problem ...

M2
Site user since 30.11.2008
Offline
88
#3

skybee, Thanks for the advice! I still made via javascript but more complex - download counter in document.ready, let's see what it will give.

In general, this can be the cause of reducing the number of clicks - to find people see that some numbers, and move on.

To post a new comment, please log in or register