: Soft 404 problem with nginx frontend to apache2 modperl backend Using nginx as a frontend to our modperl apache2 servers. We have a soft 404 problem at Google Search Console. The problem is
Using nginx as a frontend to our modperl apache2 servers.
We have a soft 404 problem at Google Search Console.
The problem is that we have many pages expiring all the time, once they expire we add a noindex robots tag immediately, show a "no longer available" screen to the viewer but are unable to send a 404 header to Google as nginx sends the header and the header is a 200 as the page is served ok in its eyes.
How can I tell apache to notify nginx to send a 404 header?
More posts by @Sue5673885
1 Comments
Sorted by latest first Latest Oldest Best
Use error_page directive and add this code:
server {
...
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
add_header Cache-Control "no-cache" always;
}
}
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.