I decided to move yet another website from WordPress to Hugo. This time the website has much more traffic than any other “of mines” (the ones that I am managing).
The main reason was speed (but also recent discussion about the environment and impact of technologies on it).
Initially, I put it as always, in the head of my website. Later on, I added it to my 404.html page. I created my own 404 page to override the default Netlify landing page that appears when the visited URL was not found.
The idea was initially to find broken links that visitors are using and to fix them with relevant redirection. However, it didn’t take long until my analytics were spammed by stupid people (and their bots) trying to find a way to break in to my site.