This paper studies optimal monetary policy rules in a framework with sticky prices, matching frictions and real wage rigidities. Optimal 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 the optimal rule should respond to unemployment alongside with inflation. This is so since models with matching frictions (unlike standard new Keynesian models) feature a congestion externality that makes unemployment inefficiently high. A strong response to inflation remains optimal while a response to output is always welfare detrimental. (c) 2007 Elsevier B.V. All rights reserved.