Google is currently indexing query strings URLs of my website. Google has currently indexed almost 112k URLs that all are duplicate version of other URLs causing my website to slow down and negatively effecting my SEO.
The structure of query strings URL is as follows:
https://example.com?te=6.18.1346158.4.18.76.huffy+blue+and+white+bike
I have contacted search community earlier and they have suggested me to add no index meta tags in my .htacces file with the following code
<If "%{QUERY_STRING} =~ /te=/"> Header set X-Robots-Tag noindex </If>
Also, I have tried it using robot.txt file to block those URLs but no relief.
It's been two weeks since I added this code on my .htacces file in my cPanel but still google is indexing those query string parameter URLs.
I am unable to figure out what's the issue please suggest me a possible solution for this as it hitting my website tremendously day by day :(
te=parameter something that your site actually uses? If not, I'll bet your site is hacked and you need to do a clean install.te=params for?teURL parameter for? If this URL param is added erroneously and not used by your application then you would implement a "redirect", otherwise you would implement something like what you are already trying. Are you seeing theX-Robots-Tagin the HTTP response for these requests? Presumably you don't have the<If>container all on one line as you have posted here? "usingrobot.txtfile" - you are missing ans; it'srobots.txt. "my.htaccesfile" - you are missing ans; it's.htaccess! If you have missed thesthen it's certainly not going to work.