Dmitriy.Net
Dmitriy.Net

Reputation: 1500

Filters and 404 header response - correct way?

I have a filter page and some filter combinations may exclude all products or content. Search engines (especially Google) index these pages well and find a huge number of these empty content filter pages.

Question: is it correct for these pages (without products) to return a 404 error or what do I need to do with these pages to disable indexing, but so that when the content appears, Google returns to this URL.

enter image description here

Upvotes: 0

Views: 30

Answers (1)

Hamza Modakir
Hamza Modakir

Reputation: 31

You didn’t specify the technology you’re using, but generally, when a search in a database yields no results, it’s better to return a 200 OK status with a user-friendly message instead of a 404 error. This way, the page remains indexable, and you can add a tag to prevent indexing of empty pages. This allows Google to return when content becomes available.

Upvotes: 1

Related Questions