In order to bulk retire multiple URLs of your web site at once, you can use nginx maps to have the webserver reply with a 410
http code, which means: GONE and not coming back.
This can be common when migrating away from a specific CMS like WordPress that builds a bunch of taxonomy pages that you will no longer be supporting or similar.
Also, this method will work for a any sort of matching you can do, but we’ll focus on 410 and a custom error page, since this is what I had to implement recently.
Lastly we will also make nginx load a custom 410 error page, instead of the boring default.
The full code can be found in the repository: https://github.com/JonathanMH/nginx-410-map
Continue reading “Nginx 410 maps, matching and external files”