This paper studies optimal monetary policy rules in a framework with sticky prices, matching frictions and real wage rigidities. Optimal monetary policy is given by a constrained Ramsey plan in which the monetary authority maximizes the agents’ welfare subject to the competitive economy relations and the assumed monetary policy rule. I find that optimal policy should deviate from the strict inflation targeting since the policy maker faces a typical unemployment/inflation trade-off. In this context and unlike a standard New Keynesian model stabilizing inflation is not sufficient to stabilize the marginal cost (hence the output gap) since the latter also depends on the evolution of unemployment. The matching frictions add a congestion externality since the number of unemployed in the market and their bargaining power reduce the probability of forming matches. Hence optimal monetary policy features unemployment targeting along with inflation targeting.