We were planning on giving a large amount of maaser to our shul, and tried to do it but could not succesfully do it on the shul website. After thinking about it, we realize that we really want to give the maaser money to the shul’s Rav (who I am almost sure doesn’t take a salary and could use the money). Is that a problem to give it to him, because we already intended to give the maaser money somewhere else?
Since you actually tried giving the money to the shul, it is considered that you seriously intended to give the money to them, and would be considered a neder to tzedakah. Therefore you should not switch to a differant tzedakah, and you should give the money to the shul.