We characterize optimal income taxation and unemployment insurance in a search-matching framework where both voluntary and involuntary unemployment are endogenous and Nash bargaining determines wages. Individuals differ in utility when voluntarily unemployed (non-participants in the labour market) and decide whether to participate as a job seeker and if so, how much search effort to exert. Unemployment insurance trades off insurance versus moral hazard due to search. We show that it is optimal to have a positive linear wage tax without any redistributive concerns even if search is efficient so the Hosios condition is satisfied. We also allow for different productivity types so there is a redistributive role for the income tax and show that a proportional wage tax internalizes the macro effects arising from endogenous wages. Lump-sum income taxes and transfers can then redistribute between individuals of differing skills and employment states. Our analysis embeds optimal unemployment insurance into an extensive-margin optimal redistribution framework where transfers to the involuntary and voluntary unemployed can differ, and nests several standard models in the literature.