It is situated at the southern end of the Rhymney Valley and separated from the Cardiff suburbs of Lisvane and Rhiwbina by Caerphilly Mountain.
[6] Despite lack of evidence, tradition states that a monastery was built by St Cenydd, a sixth-century Christian hermit from the Gower Peninsula, in the area.
His grandson Gruffydd ap Rhys was the final Welsh lord of Sengenhydd, which fell to the English nobleman Gilbert de Clare, the Red Earl, in 1266.
Gilbert de Clare had already begun to take steps to consolidate his own territorial gains, beginning the construction of Caerphilly Castle on 11 April 1268.
[10] The castle would also act as a buffer against Llewelyn's own territorial ambitions and was attacked by the Prince of Wales' forces before construction was halted in 1270.
[11][13] The original town of Caerphilly grew up as a small settlement established just south of the castle by Gilbert de Clare.
In coming to the defence of his people, Llywelyn Bren, the great-grandson of Ifor Bach and Welsh Lord of Senghenydd, incurred the wrath of de Turberville, who charged him with sedition.
[11][16] The Lewis family, who claimed descent from Ifor Bach, left the manor in the mid-18th century when they purchased St Fagans Castle, the Van falling into decay.
The county borough council's main offices are not in the town of Caerphilly itself, but in the more central location of Ystrad Mynach.
The district covered by the board included a substantial area to the west and north-west of the town itself, extending to Taff's Well, Nelson and the southern part of Ystrad Mynach.
A Caerphilly community was established at the same time, being a lower-tier authority, initially covering that part of the former urban district within Rhymney Valley.
They include comedian Tommy Cooper and the footballers David Pipe, Aaron Ramsey and Robert Earnshaw, whose family relocated to the town from Zambia.
In 2012 Caerphilly County's only art gallery, Y Galeri, opened in St Fagan's Street in the town centre.
[35] In 2015, Caerphilly-born writer Thomas Morris published a short story collection, We Don't Know What We're Doing, which is set in Caerphilly.
Since 1979, a representative sample of adult males born between 1918 and 1938, living in Caerphilly and the surrounding villages of Abertridwr, Bedwas, Machen, Senghenydd and Trethomas, have participated in the study.
A notable report was on the reductions in vascular disease, diabetes, cognitive impairment and dementia attributable to a healthy lifestyle.
The A468 skirts the northern boundary of the town connecting the west with the A470 and the east with the M4 Motorway European route E30 at junction 28.
A community bus service called Connect2 is also operated by Caerphilly Council which serves Mornigton Meadows, Bryncenydd and Glenfeilds Estate.
New trains will be introduced (British Rail Class 756), Increasing capacity, more frequent services and greener transport for the town and the local region.