Williams struggled as Lance Stroll was 16th fastest with team-mate Felipe Massa below him.
In the fight for pole still made a decision to first fastest lap from Bottas - Finnish driver of "Mercedes" on 0,042 thousandths of a second ahead of Vettel, while Hamilton is located on the third intermediate position. Third place in the championship standings is now occupied by Bottas who has 136 points.
It was only Bottas's second win and leaves the 27-year-old just 15 points behind Hamilton in the drivers' standings.
There had been calls for Vettel to be hit with penalties for this race after he drove his auto into Hamilton's at the Azerbaijan Grand Prix in protest to what he considered a unsafe braking manoeuvre.
For Ricciardo, on his team's "home" Red Bull Ring circuit, it was a fifth consecutive podium finish and the 22nd of his career.
Yet Hamilton recovered from eight on the grid, after a five-place penalty for making an unauthorised gearbox change, and added that there were some positives.
Hamilton started eighth after a five-place grid penalty and set the fastest lap of the race.
Vettel said: "What I did was wrong".
It's the Canadian driver's third time registering points this season after a stunning podium in Baku two weeks ago. After Wehrlein's time, Ericsson came on top followed by Magnussen before Vettel emerged with a much quicker 1m06.437s lap. Vettel's second-place finish, however, means that he pulls a bit farther away from Lewis Hamilton.
After 30 of the 71 laps, Bottas had built up a lead of some 7.6 seconds over Vettel. Following all of the drama that unfolded in Azerbaijan, Ferrari ace Vettel will surely be looking to redeem himself against the Mercedes duo. Vettel was in third ahead of Ricciardo and Hamilton, who was complaining about a balance problem on the rear of his vehicle.