Author Topic: Order details and invoice are public and searcheable in Google  (Read 3620 times)

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2265
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Order details and invoice are public and searcheable in Google
« Reply #45 on: July 26, 2017, 13:53:44 pm »
Tyr in .htaccess
#Activate rewriting
RewriteEngine On
#disable access from google
RewriteCond %{HTTP_REFERER} google\.com [NC]
RewriteCond %{QUERY_STRING} ^view=invoice
RewriteRule .* - [F]

You can use similar using the user agent
RewriteCond %{HTTP_USER_AGENT} AltaVista [OR]
RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
RewriteCond %{HTTP_USER_AGENT} msnbot [OR]
RewriteCond %{HTTP_USER_AGENT} Slurp
RewriteCond %{QUERY_STRING} ^view=invoice
RewriteRule .* - [F]
See for eg. https://www.htmlremix.com/seo/block-google-and-bots-using-htaccess-and-robots-txt
Some more info http://www.inmotionhosting.com/support/website/restricting-bots/how-to-stop-search-engines-from-crawling-your-website
Note : i don't tested the rules

javerleo

  • Beginner
  • *
  • Posts: 11
Re: Order details and invoice are public and searcheable in Google
« Reply #46 on: July 26, 2017, 22:15:21 pm »
Thanks Studio 42.

I will try to use .htaccess directives instead of PHP custom code to redirect the unwanted Google links. On the other hand, I still can't find a way to stop Google indexing the PDF orders. This store uses Cloudflare CDN for caching. Could it be the origin of the problem?

Best regards. 

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Order details and invoice are public and searcheable in Google
« Reply #47 on: July 26, 2017, 23:06:08 pm »
This store uses Cloudflare CDN for caching. Could it be the origin of the problem?

Very much so. A lot of people have had cart problems using Cloudflare which presents url caching issues. There is no reason to use a CDN for a store site. If site speed is the issue then use a faster, more resourced host.
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

javerleo

  • Beginner
  • *
  • Posts: 11
Re: Order details and invoice are public and searcheable in Google
« Reply #48 on: July 26, 2017, 23:21:27 pm »
Thank you jenkinhill.

I will take your advice.


Regards.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2602
  • VirtueMart Version: 3.2.4
Re: Order details and invoice are public and searcheable in Google
« Reply #49 on: July 27, 2017, 10:33:19 am »
Quote
Created a redirect rule via PHP code at the beginning of the main index.php (bad idea since it will be removed with updates. Where should I put the code?). Now all the Google links redirect to the site homepage (checking HTTP referral).

Adding an .htaccess rule to redirect links is fine

But your registered customers will no longer be able to view their invoices when they sign in to their account
regards
A

Joomla 3.7.4
php 5.6 + php 7

tomphillipspcs

  • Beginner
  • *
  • Posts: 39
  • A beginner
Re: Order details and invoice are public and searcheable in Google
« Reply #50 on: July 27, 2017, 13:13:34 pm »
Actually seems to have been fixed now - so it does look like this was a bug in virtuemart/joomla

Tom