The Cdc48 N-terminal domain has a molecular switch that mediates the Npl4-Ufd1-Cdc48 complex formation.