Ah, I see. We do it for a handful of sites using the Redirection plugin, which is popular and fairly flexible.
But your solution is very cool (it reminds me of how Signal identifies which user contact phone numbers are signal users in a more or less privacy preserving way).