I’m trying to show up the 410 status code of the pages which have criteria of /*.pdf to 410. It’s saying to google that the page is gone and it’s not coming back.
I added this code in the _redirects page
#Redirects .pdf extension with the 410 status code
/*.pdf / 410
But when I tried to test with my crawling software, it shows 404 pages. So basically 404 error.
I believe there is not a match on the redirect you have so it falls through and ends up returning the 404 (missing) redirect. When I added the full path above (match) I get the 410 as expected.
Our redirects parsing does not currently support wildcards like *.pdf or regex. It only supports placeholders and path wildcards (at the end of paths). There is a feature request for it and I’ve added a reference to this thread so that if it gets implemented, we can let you know.