Obererlinsbach is a former municipality in the district Gösgen in the canton of Solothurn in Switzerland. On 1 January 2006 the former municipalities of Niedererlinsbach and Obererlinsbach became the municipality of Erlinsbach.