Score:0

I want to add a custom 404 to all my URLs following a relevant pattern using .htaccess file

sg flag

Hello,

Google is currently indexing query string URLs of my website. Google has currently indexed almost 112k URLs that all of are duplicate versions of other URLs causing my website to slow down and negatively affecting my SEO.

The structure of the query strings URL is as follows: https://example.com?te=6.18.1346158.4.18.76.huffy+blue+and+white+bike

I contacted the search community earlier and they suggested me to add 404 status to the URLs with this pattern in my .htacces file.

What code should I add in my .htaccess file to block these URLs from google.

in flag
If you only want to restrict search engines, IMO a [robots.txt approach](https://stackoverflow.com/questions/9149782/ignore-urls-in-robot-txt-with-specific-parameters) would make more sense.
Arrow Root avatar
sm flag
Are you using WordPress or PHP alone?
mehtab fatima avatar
sg flag
I am using WordPress, Also I want to remove Google and robots.txt approach is used for crawling not indexing.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.