If a link to our site is coming in from an external site how can I detect it and add it to a list?
Basically: external link points to [site.com/thisdoesnotexist/](https://site.com/thisdoesnotexist/) , add the link source and destination to a list. Maybe send the WP admin an email notification.
Example: A marketer sends out an email to a group and makes a mistake with using the wrong url. It would be cool to be able to detect that and make a 301 or some other solution..
Edit: I meant to say 404 error not 401! What is a 401 error even?!
You could just use [this plugin](https://wordpress.org/plugins/redirection/), which captures 404 errors. It has the option to redirect each error that is found. It doesn’t email them to you (might be an option, I’ve not checked), but everything is in a list in order of newest to oldest.