nginx 410, its really gone google.
January 22, 2016

nginx 410, its really gone google.

Posted on January 22, 2016  •  1 minutes  • 151 words  •  Suggest Changes

Googlebot is a real hero, it believes my ancient posts are still not dead. In webmaster tools I still get the message I got 404’s on my website, linking to ancient posts I made a few years back. As long as someone remembers they are not dead! -Keep believing that-  Anyways, while 404 don’t really hurt the website -web is dynamic-, its a clean way to report back that there is little to no chance those exact posts will ever return.

One can simply add 410’s to the Nginx configuration to show bots and browsers that the page is removed from the website/database and should not be accessed any longer. I added them manually to the location / with this ugly little hack :

location / {
if ($uri ~ "/working-on-server-move/") { return 410; }

if you try something similar first try with a 418 (htcpcp), see a 418 at work.


If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper