Dorneck District is one of the ten districts of the canton of Solothurn in Switzerland, situated to the north of the canton. Together with Thierstein District, it forms the Amtei (electoral district) of Dorneck-Thierstein. It has a population of 20,802 (as of 31 December 2020). Five of the district's eleven municipalities are exclaves, either within the canton of Basel-Country or bordering France.