Page 1 of 1
[SOLVED] SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Thu May 16, 2024 12:43 am
by doktorek
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.
Re: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Thu May 16, 2024 1:33 am
by ADD Creative
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.
Re: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Thu May 16, 2024 7:26 pm
by paulfeakins
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.
Re: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Thu May 23, 2024 6:07 am
by doktorek
No, not hacked. Google is indexing all my search pages... I need to stop it from indexing
Re: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Thu May 23, 2024 5:23 pm
by JNeuhoff
Have you added these to your robots.txt:
Code: Select all
Disallow: /*?route=product/search
Disallow: /*&route=product/search
?
Re: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Thu May 23, 2024 7:40 pm
by nonnedelectari
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=*
Re: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Fri May 24, 2024 11:27 pm
by doktorek
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
Re: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Sat May 25, 2024 6:44 am
by ADD Creative
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>
Re: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Sat May 25, 2024 7:05 am
by nonnedelectari
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
SOLVED: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Wed Jun 05, 2024 3:16 am
by doktorek
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
Re: SOLVED: SEO Q: Search pages in Google Console show " Duplicate without user-selected canonical "
Posted: Tue Feb 11, 2025 3:49 am
by Ahmed-E-Shop
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