Hanrahan made his debut for Ireland Under-20 on 11 February 2011 against France Under-20, during the 2011 Under-20 Six Nations Championship. He played at the 2011 Junior World Championship. In June 2012, he was fly-half for Ireland Under-20 in a famous win at the 2012 U-20 IRB Junior World Championship against hosts South Africa Under-20. Hanrahan again played a crucial role at fly-half in Ireland Under-20s victories against England Under-20s and France Under-20s, wins that saw Ireland Under-20 finish 5th at the 2012 competition, their best ever finish at the time. For his performances at the Junior World Championship, and throughout 2012, Hanrahan was nominated for the IRB Junior Player of the Year Award 2012.