seo – How can I display the "Gone 410" status for old product pages with the product query string of a Netlify _redirects file?

I can not delete the old content from Google search results. One of the suggestions was to redirect the old pages to error page 410 so that Google knew how to delete them. The original website was created in WordPress. I'm using Netlify and Hugo now.

  • Old pages www.example.com/?product = ...
  • My new pages are www.example.com/products / ...

I have tried

  • / product / * 410.html 410
  • /? product / * 410.html 410

in my _redirects file but no luck. I also have https://prestoshears.netlify.com https://prestoshears.com 301 in _redirects.

How can I configure this correctly?