Hello!
Empty searches on my site return a 200 status, but they should return a 404.
Does anyone know if it’s possible to fix this? If so, how?
Hello!
Empty searches on my site return a 200 status, but they should return a 404.
Does anyone know if it’s possible to fix this? If so, how?
Hi, how are you?
Are you using Legacy or VTEX IO?
If you’re using IO, the main block that handles search results is search-result. For searches with no results, you can configure the “search-not-found-layout”.
Like this:
“search-not-found-layout”: {
“children”: [“flex-layout.row#searchbread”, “flex-layout.row#notfound”]
},
Also take a look at how your search-result is configured, it looks something like this:
“search-result-layout”: {
“blocks”: [
“search-result-layout.desktop”,
“search-result-layout.mobile”,
“search-not-found-layout”
]
},