In the standard herding model, privately informed individuals sequentially see prior actions and then act. An identical action herd eventually starts and public beliefs tend to “cascade sets” where social learning stops. What behaviour is socially efficient when actions ignore informational externalities? We characterize the outcome that maximizes the discounted sum of utilities. Our four key findings are: (1) cascade sets shrink but do not vanish, and herding should occur but less readily as greater weight is attached to posterity. (2) An optimal mechanism rewards individuals mimicked by their successor. (3) Cascades cannot start after period one under a signal log-concavity condition. (4) Given this condition, efficient behaviour is contrarian, leaning against the myopically more popular actions in every period. We make two technical contributions: as value functions with learning are not smooth, we use monotone comparative statics under uncertainty to deduce optimal dynamic behaviour. We also adapt dynamic pivot mechanisms to Bayesian learning.