On 19 November 2008, Ziegler scored his first senior goal for Switzerland, a powerful left-footed strike against Finland which won the Swiss the match, 1–0. He was selected for the 2010 World Cup squad. He started at left back and played the full 90 minutes in all three matches in the group stage. Switzerland did not advance out of the group. Ziegler was selected again for Switzerland's 2014 World Cup squad. This time, however, he did not appear in any matches.