This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Vettalo

  • ***
  • 59 posts
google is crawling itemviewer problem
« on: March 31, 2021, 10:02:23 PM »
google search is crawling website.com/send-friend/item-id?type=itemviewer?
even if i have i item-send-friend.php
  <meta name="robots" content="noindex, nofollow" />
  <meta name="googlebot" content="noindex, nofollow" />

anyone has faced this problem?
Regards.

*

mocody

  • ****
  • 139 posts
  • Only Marketing matters
Re: google is crawling itemviewer problem
« Reply #1 on: April 01, 2021, 11:40:34 AM »
I have spoted and reported this for months ago, and still having problem, did you update the osclass to 4.3 and then see robots.txt
even google indexed the OC-admin. with no-follow and disabled at the robots.

*

Vettalo

  • ***
  • 59 posts
Re: google is crawling itemviewer problem
« Reply #2 on: April 01, 2021, 12:28:26 PM »
I have spoted and reported this for months ago, and still having problem, did you update the osclass to 4.3 and then see robots.txt
even google indexed the OC-admin. with no-follow and disabled at the robots.
I have just noticed this problem i used remove url in google console search temporarily until i find solution
I dont think its hard to fix it just need a line of php in item.php i will try to fix it and notify you.
Regards.

*

MB Themes

Re: google is crawling itemviewer problem
« Reply #3 on: April 01, 2021, 07:10:45 PM »
Solution would be probably in item.php ir head.php and set nofollow attributes for item viewer
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Vettalo

  • ***
  • 59 posts
Re: google is crawling itemviewer problem
« Reply #4 on: April 02, 2021, 08:43:13 PM »
Solution would be probably in item.php ir head.php and set nofollow attributes for item viewer
i have tried in head.php

<?php if( !osc_is_search_page() )  { ?>
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />

  <?php } else if($itemviewer == 1) { ?>
  <meta name="robots" content="noindex, nofollow" />
  <meta name="googlebot" content="noindex, nofollow" />
  <?php } ?>


and no way
the index follow only comes from head.php not from item.php
Regards.

Marked as best answer by frosticek on April 04, 2021, 02:06:39 PM
*

Vettalo

  • ***
  • 59 posts
Re: google is crawling itemviewer problem
« Reply #5 on: April 02, 2021, 09:51:37 PM »
I have spoted and reported this for months ago, and still having problem, did you update the osclass to 4.3 and then see robots.txt
even google indexed the OC-admin. with no-follow and disabled at the robots.

add this code into head in item page

<?php if($itemviewer == 0)  { ?>
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
  <?php } else if($itemviewer == 1) { ?>
  <meta name="robots" content="noindex, nofollow" />
  <meta name="googlebot" content="noindex, nofollow" />
  <?php } ?>


and change code or remove it as it is not needed in head.php

<?php if(!osc_is_search_page())  { ?>
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<?php } ?>


to

<?php if(!osc_is_search_page() && !osc_item())  { ?>
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<?php } ?>


if you removed it dont forget to add in main.php

<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />

Regards.
« Last Edit: April 02, 2021, 10:16:57 PM by Vettalo »