Rubigen is a municipality in the Bern-Mittelland administrative district in the canton of Bern in Switzerland.
Rubigen is first mentioned in 1267 as Rubingen.
The oldest traces of a settlement in the area include scattered neolithic and Bronze Age items and La Tene tombs. The remains of a Roman era fountain and an early medieval cemetery have also been found. During the Middle Ages, the village was part of the Herrschaft of Münsingen. The rulers of Münsingen built a fort near the village around 1278. Very little is known of the history of the fort, but it fell into ruins was demolished in 1798. During the 15th century, the village broke away from the Herrschaft and in the following century it became subject to the city of Bern. Due to its proximity to the city Bernese patricians built their summer homes in the area.
The hamlet of Beitenwil was first mentioned in 1328 as Beitenwile. It was originally owned by Fraubrunnen Abbey. However, in 1473, it was acquired by the Herrschaft of Worb and was combined with Trimstein. In 1834 the three school districts of Rubigen, Allmendingen and Trimstein merged to form the political municipality of Rubigen. These three would remain politically united until 1993.