Recommendation: Do use Google photospheres here!
The Templars built the fortress there during the 12th and 13th centuries.
Following their dissolution in 1312, the Templars' property (town and large agricultural tracts of land outside) was taken by the Knights of St John of Jerusalem who were responsible for building the curtain wall (parts of it visible in this photo) between 1439 and 1450.
Today it has the distinction to belong to the group of "most beautiful villages of France". It is a touristic attraction in an otherwise sparsely populated area. The population proper of the village is by now below 200.