Trackbacks and Pings in WordPress

If  you are getting lots of random and unexpected entries in your web logs like this one: - - [27/May/2017:13:04:13 +0000] "POST HTTP/1.1" 400 302

then you are being targeted by spammers looking to fill your blog with spam comments or to generate response emails to random endpoints, which in turn keeps your mail server busy.
Trackbacks are useful in theory but I find they generally just get abused and turn them off. I had overlooked it on my current WordPress instance but this post is the most thorough set of instructions to remedy it…