How do I show "410 Gone" status for old product pages with ?product query string from a Netlify _redirects file?

How do I show "410 Gone" status for old product pages with ?product query string from a Netlify _redirects file? - Google Search Console is a free application that allows you to identify, troubleshoot, and resolve any issues that Google may encounter as it crawls and attempts to index your website in search results. If you’re not the most technical person in the world, some of the errors you’re likely to encounter there may leave you scratching your head. We wanted to make it a bit easier, so we put together this handy set of tips about seo, google-search, 410-gone, netlify to guide you along the way. Read the discuss below, we share some tips to fix the issue about How do I show "410 Gone" status for old product pages with ?product query string from a Netlify _redirects file?.Problem :


I'm having problems removing old content from Google search results. One of the suggestions was to redirect the old pages to 410 error page so google would know to drop these pages.The original website was built in WordPress. I'm using Netlify and hugo now.




  • The old pages www.example.com/?product=...

  • My new pages are www.example.com/products/...



I 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 properly?


Solution :

I recommend you use the 301 permanent redirect.



Netlify allows for query params to be captured at the time of the redirect. The params are lost after a redirect, so you have to make an EXACT match.



The correct way would be to add a _redirect entry for the query param like so:



/ product=:product /products/:product 301


Note: I know this is a little late. When I went to one of your old links, the value was no longer there on the new site. For the old search below I would expect to see a page at /products/presto-shears-5-5-inches-11 based on your explanation above.



enter image description here


If the issue about seo, google-search, 410-gone, netlify is resolved, there’s a good chance that your content will get indexed and you’ll start to show up in Google search results. This means a greater chance to drive organic search traffic to your site.

Comments

Popular posts from this blog

Years after news site changed name, Google is appending the old name to search titles and news stories

Is it possible to outrank Google for a search term on their own search engine?

Load Wikipedia sourced biographies via Ajax or render it with the rest of the page as part of the initial request?