This paper shows that optimal unemployment insurance contracts are age-dependent. Older workers have only a few years left on the labor market prior to retirement. This short horizon implies a more digressive replacement ratio. However, there is a sufficiently short distance to retirement for which flat unemployment benefits can be the optimal contract as the nearly retired unemployed workers rationally expect never to suffer from the punishment. This is why imposing a tax on the future job is particularly efficient in the context of older workers because the agency can now reward the job search by present employment subsidies. Moreover, we propose adopting a global approach to unemployment insurance by determining an optimal contract that integrates unemployment insurance and retirement pension systems.