old ?cid= and ?pid= URLs keep showing up in search results

Our old shop used product and category IDs in query strings. We moved to clean URLs a year ago, but Google still shows the parameter versions and some of them now 404. Should every one of these be redirected individually?
1

Leave A Reply

Log in to post an answer.

1 Answer

eves Oct 19, 2026
katev
If those parameters map to real pages on the new setup, 301 each one to its clean equivalent. Redirect rules can match on the query string, so you don't have to do it by hand. If they map to nothing, return a 410 or 404. The trap: don't block them in robots.txt. That stops Google crawling them, which means it never sees the redirect or the 404, and they can sit in the index even longer. The removals tool in Search Console hides them for about six months, which helps if they're embarrassing, but it's a band-aid. They drop out properly once Google recrawls and sees the redirect.