Abstract Field experiments show that employers are less likely to consider long-term unemployed job-seekers for interviews. We study the implications for optimal unemployment insurance (UI). Based on a structural model of job search and recruitment, estimated with German data, we analyse the optimal two-tier unemployment system. We find that screening makes the optimal initial benefit level four percentage points higher and the potential benefit duration seven months longer. Using an extended Baily-Chetty formula, we study the mechanisms through which screening affects the consumption smoothing gain and moral hazard cost of providing UI and highlight the role of the externality from endogenous firm behaviour.