Costa played for Portugal at under-21 level and was also a part of the Olympic team that played in the 2004 Summer Olympics in Athens.
A full international since 2005, he was called up to the squad for the 2006 FIFA World Cup, where he appeared against Germany in the 1–3 third-place playoff loss.

On 10 May 2010, national team boss Carlos Queiroz announced a provisional list of 24 players in view for the 2010 World Cup in South Africa, with Costa being included, thus returning to the squad after a four-year absence.
He played twice in the tournament, always as right back: in the 0–0 group stage draw against Brazil, and the round-of-16 defeat to Spain (0–1, where he was sent off in the last minute, receiving a three-match ban for his actions).

Costa played and started two games in the 2014 World Cup qualifying campaign.
He scored his first international goal on 11 October 2013 in a 1–1 home draw against Israel, and was named by manager Paulo Bento in the final 23-man squad for the tournament in Brazil.

On 16 June 2014, Costa became the second Portuguese to play in three World Cups after Cristiano Ronaldo did so in the same match, coming on for the second half of the first group stage match against Germany, a 0–4 loss.
He was then selected to replace the suspended Pepe in a 2–2 draw with the United States, making a goal-line clearance from Michael Bradley in the second half.
Costa played for Portugal at under-21 level and was also a part of the Olympic team that played in the 2004 Summer Olympics in Athens. A full international since 2005, he was called up to the squad for the 2006 FIFA World Cup, where he appeared against Germany in the 1–3 third-place playoff loss.
On 10 May 2010, national team boss Carlos Queiroz announced a provisional list of 24 players in view for the 2010 World Cup in South Africa, with Costa being included, thus returning to the squad after a four-year absence. He played twice in the tournament, always as right back: in the 0–0 group stage draw against Brazil, and the round-of-16 defeat to Spain (0–1, where he was sent off in the last minute, receiving a three-match ban for his actions).
Costa played and started two games in the 2014 World Cup qualifying campaign. He scored his first international goal on 11 October 2013 in a 1–1 home draw against Israel, and was named by manager Paulo Bento in the final 23-man squad for the tournament in Brazil.
On 16 June 2014, Costa became the second Portuguese to play in three World Cups after Cristiano Ronaldo did so in the same match, coming on for the second half of the first group stage match against Germany, a 0–4 loss. He was then selected to replace the suspended Pepe in a 2–2 draw with the United States, making a goal-line clearance from Michael Bradley in the second half.
Ricardo Costa (footballer, born 1981)