In the Commander format, a special replacement effect exists that lets a commander's owner choose to send it to the command zone whenever it would move to the graveyard or the exile zone. This applies regardless of the source of the effect — it doesn't matter if the exile is caused by your own spell, an opponent's spell, or any other game effect (CR 903.9a).
This is a replacement effect applied by the commander's owner, not a triggered ability. The choice is made as the event would happen, replacing the destination. Crucially, because it replaces the exile event, the commander is never actually exiled — it simply never arrives in the exile zone (CR 614.1).
This matters for spells that care about the card being exiled. For example, if an opponent casts Swords to Plowshares targeting your commander, you may choose to redirect your commander to the command zone instead of exile. Your opponent still gains life (that part of the spell resolves normally), but your commander ends up in the command zone rather than exile.
The commander can then be recast from the command zone by paying its mana cost plus the commander tax (an additional 2 generic mana for each previous time it was cast from the command zone that game) (CR 903.8).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.