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>
Code: Select all
<IfModule mod_headers.c>
<FilesMatch "^search?$">
Header set X-Robots-Tag: "noindex, nofollow"
</FilesMatch>
</IfModule>
Google is indexing every search quary. Even this garbage.