When a request comes into my site without a trailing slash, e.g., /about, I redirect to /about/ before serving any content. If a user requests a non-existant URL, they’ll receive a 302 redirect before getting their 404. Our (very trustworthy) SEO team tells me that this confuses search engines, and that only having the 404 is key. I believe this, but I’m not totally sure I understand why. Can someone explain the technical reasoning?
When a request comes into my site without a trailing slash, e.g., /about ,
Share
You should serve 404 without any redirect, as if you are redirecting away from the page it’s not the removed page that is returning a 404. I will give an example where this might cause problems.
So you have a page which you decide to remove that is indexed in Google. You remove the page and it now 302 redirects to a 404 page. However as a 302 redirect is a temporary redirect this removed page will stay in Google’s results, as you are telling Google it’s only temporarily moved. If the actual url returns a 404 page the page will over time drop out of Google’s index.