We employ a monetary model with endogenous search and random consumption preferences to consider the extent to which a government can ban an alternative currency, like bitcoin. We define a ban as a policy whereby government agents refuse to accept an alternative currency and mete out punishments to private agents caught using it. After identifying monetary equilibria where an alternative currency is accepted, we then derive the conditions under which a ban might deter its use. As in earlier studies, we show that a government of sufficient size can prevent an alternative currency from circulating without relying on punishments. We also show that, given its size, a government can ban an alternative currency so long as it is willing and able to mete out sufficiently severe punishments.