Riordan, who has nailed down a permanent place on the side this season, is currently on a development contract with Connacht having come through the province's academy.
He has featured in 16 of Connacht's 18 games and is the side's top try scorer this season with five touchdowns.
"It has gone well for me this season and I am delighted to agree a new contract for the next couple of years.
"We are putting together a strong side and I am looking forward to my game developing as we move forward," said Riordan, a native of Annaghdown.
Riordan developed his rugby with Corinthians and in Colaiste Iognaid before moving into the Connacht academy.
Connacht CEO Gerry Kelly said it was very encouraging to see players like Riordan come through the system.
"Danny is having a great season and it is great to see him pledging his future to the side. He is one of many young players to come through the academy and it is very encouraging in itself to see players develop like that," said Kelly.
Riordan has played for the Irish U-21 side in the Six Nations and the World Cup in Argentina.
Riordan made his debut for Connacht last season, making all seven appearances as a replacement but this year he has started in fifteen of his sixteen appearances.