Post by doktorek » Thu May 16, 2024 12:43 am

Problem with SEARCH pages only
Im running OC 3.x . Someone is spamming me with

https://www.mysite.com/search?tag=武汉外围价格科普[预约电话微信188-5204-2435]提供高质量小姐上门服务 快速选照片安排 面到付款 30分钟内到达.0503
https://www.mysite.com/searchproduct?tag=拉萨 高级资源[电话微信█188-5204-2435█].-拉萨资源(小姐上门外围)-拉萨同城(上门服务)-拉萨约炮(约上门服务)约炮-拉萨按摩外围上门-拉萨商务伴游(商务模特)商务伴游.0413

Google is trying to index them. I did robots.txt but google says that is should have a tag NO INDEX to work properly.

Google console says Duplicate without user-selected canonical.
1 - How do I make NO INDEX on the "search pages". I already did robots.txt
2 - All pages have rel="canonical" but not the search page. How do I make search pages rel="canonical"

Already have rel="canonical" on all product and category pages set up. Not on a search page.

I tried this in htacces :

Code: Select all

<If "%{QUERY_STRING} =~ m#route=product/search#i">
Header set X-Robots-Tag "noindex, nofollow"
</If>
or

Code: Select all

<IfModule mod_headers.c>
<FilesMatch "^search?$">
Header set X-Robots-Tag: "noindex, nofollow"
</FilesMatch>
</IfModule>
but im not seeing the tag on the page when I do CTRL+U so I guess it doesnt work

Google is indexing every search quary. Even this garbage.
Last edited by doktorek on Wed Jun 05, 2024 3:18 am, edited 1 time in total.

New member

Posts

Joined
Thu Apr 28, 2016 8:40 pm

Post by ADD Creative » Thu May 16, 2024 1:33 am

You won't see a tag in the source. You need to use your web browser's developer tool network tab and inspect the response header.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Thu May 16, 2024 7:26 pm

doktorek wrote:
Thu May 16, 2024 12:43 am
Problem with SEARCH pages only
Im running OC 3.x . Someone is spamming me with
Spamming you? I think it looks like you've been hacked. Get a competent developer to check your site ASAP.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by doktorek » Thu May 23, 2024 6:07 am

No, not hacked. Google is indexing all my search pages... I need to stop it from indexing

New member

Posts

Joined
Thu Apr 28, 2016 8:40 pm

Post by JNeuhoff » Thu May 23, 2024 5:23 pm

Have you added these to your robots.txt:

Code: Select all

Disallow: /*?route=product/search
Disallow: /*&route=product/search
?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by nonnedelectari » Thu May 23, 2024 7:40 pm

JNeuhoff wrote:
Thu May 23, 2024 5:23 pm
Have you added these to your robots.txt:

Code: Select all

Disallow: /*?route=product/search
Disallow: /*&route=product/search
?
His urls there are for tags:

https://www.mysite.com/search?tag=......

so

Code: Select all

Disallow: /*?tag=*
Disallow: /*&tag=*

Active Member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by doktorek » Fri May 24, 2024 11:27 pm

I did the robots.txt file and I did the .htaccess block. Robots.txt doestn help much. Google will still index content.

But I need to put NOINDEX and / or CANONTICAL on all search pages, going into the future so google doesnt show me "Duplicate without user-selected canonical ".
I dont how how!

My seo plugin does CONONICAL on other pages, just not on the search page. How to do NO INDEX or CANONICAL on the search page. I found old article

New member

Posts

Joined
Thu Apr 28, 2016 8:40 pm

Post by ADD Creative » Sat May 25, 2024 6:44 am

The following should work in htaccess, but you will have to remove from robots.txt otherwise Goolge won't see it. You will also not see it as a HTML tag on the page, you need to look at the response headers.

Code: Select all

<If "%{QUERY_STRING} =~ m#route=product/search#i">
Header set X-Robots-Tag "noindex, nofollow"
</If>

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by nonnedelectari » Sat May 25, 2024 7:05 am

doktorek wrote:
Fri May 24, 2024 11:27 pm
I did the robots.txt file and I did the .htaccess block. Robots.txt doestn help much. Google will still index content.

But I need to put NOINDEX and / or CANONTICAL on all search pages, going into the future so google doesnt show me "Duplicate without user-selected canonical ".
I dont how how!

My seo plugin does CONONICAL on other pages, just not on the search page. How to do NO INDEX or CANONICAL on the search page. I found old article
tag= pages are actually predefined search pages as you define the tags, not the customer unlike the search= pages. Therefore, it is bad to have these indexed.
Still, you could read this post:
viewtopic.php?t=220235#p800800

Active Member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by doktorek » Wed Jun 05, 2024 3:16 am

I found another way to fix the indexing issue of existing "junk" inidexed pages with "tags" in the path

in htaccess file I just 410 all those error pages for google console. These pages no longer return anything. Google should remove them asap
I made a custom 410 page with an error for apache

Code: Select all

ErrorDocument 404 default
ErrorDocument 404 /410.php
ErrorDocument 410 /410.php

RewriteEngine on 
RewriteCond %{QUERY_STRING} tag
RewriteRule .* - [G,L]
So any string with keyword "tag" or any other keyword (that you define there instead of "tag"), will return 410 page. Google should take care of the rest. Fingers crossed.
1st line resents your 404 page to server side 404 page if you have a theme based custom one


Also, to find out the true header site returns, there is a great extension for SEOs called "Redirect path" in chrome extenstions

New member

Posts

Joined
Thu Apr 28, 2016 8:40 pm

Post by Ahmed-E-Shop » Tue Feb 11, 2025 3:49 am

I found that in my Google Search Console. And I applied what they said in this post :
viewtopic.php?p=877067
and I will follow what happens in my GSC

New member

Posts

Joined
Mon Nov 11, 2024 7:40 pm
Who is online

Users browsing this forum: Semrush [Bot] and 57 guests