There is no substantive evidence that Shaftesbury was the "Caer Palladur" (or "Caer Palladwr") of Celtic and Roman times, and instead the town's recorded history dates from Anglo-Saxon times.
By the early 8th century there was an important minster church here, and in 880 Alfred the Great founded a burgh (fortified settlement) here as a defence in the struggle with the Danish invaders.
The burgh is recorded in the early-10th-century Burghal Hidage as one of only three that existed in the county (the others being at Wareham and 'Bredy' - which is probably Bridport).

In 888 Alfred founded Shaftesbury Abbey, a Benedictine nunnery by the town's east gate, and appointed his daughter Ethelgifu as the first abbess.
Æthelstan founded two royal mints, which struck pennies bearing the town's name, and the abbey became the wealthiest Benedictine nunnery in England.
On 20 February 981 the relics of St Edward the Martyr, the teenage King of England, were transferred from Wareham and received at the abbey with great ceremony, thereafter turning Shaftesbury into a major site of pilgrimage for miracles of healing.

King Canute died here in 1035, though he was buried at Winchester.
Edward the Confessor licensed a third mint for the town.
By the time of the Norman conquest in 1066 Shaftesbury had 257 houses, though many were destroyed in the ensuing years of conflict, and by the time the Domesday Book was compiled twenty years later, there were only 177 houses remaining, though this still meant that Shaftesbury was the largest town in Dorset at that time.
Around this time the town's ownership was equally shared between king and abbey.
In the first English civil war (1135-1154) between Empress Matilda and King Stephen, an adulterine castle or fortified house was built on a small promontory at the western edge of the hill on which the old town was built.
The site on Castle Hill, also known locally as Boltbury, is now under grass and is a scheduled monument.

In 1240 Cardinal Otto (Oddone di Monferrato), legate to the Apostolic See of Pope Gregory IX visited the abbey and confirmed a charter of 1191, the first entered in the Glastonbury chartulary.
During the Middle Ages the abbey was the central focus of the town; the abbey's great wealth was acknowledged in a popular saying at the time, which stated that "If the abbot of Glastonbury could marry the abbess of Shaftesbury their heir would hold more land than the king of England".
In 1260 a charter to hold a market was granted.
By 1340 the mayor had become a recognised figure, sworn in by the steward of the abbess.
In 1392 Richard II confirmed a grant of two markets on different days.
Edwardstow, Shaftesbury's oldest surviving building, was built on Bimport at some time between 1400 and 1539.
Also in this period a medieval farm owned by the Abbess of Shaftesbury was established, on a site now occupied by the Tesco supermarket car park.

In 1539, the last Abbess of Shaftesbury, Elizabeth Zouche, signed a deed of surrender, the (by then extremely wealthy) abbey was demolished, and its lands sold, leading to a temporary decline in the town.
Sir Thomas Arundell purchased the abbey and much of the town in 1540, but when he was later exiled for treason his lands were forfeit, and the lands passed to Pembroke then Anthony Ashley-Cooper, 7th Earl of Shaftesbury, and finally to the Grosvenors.

Shaftesbury was a parliamentary constituency returning two members from 1296 to the Reform Act of 1832, when it was reduced to one, and in 1884 the separate constituency was abolished.

In Survey of Dorsetshire, written in about 1630 by Thomas Gerard of the Dorset village of Trent, Shaftesbury is described as a "faire Thorough Faire, much frequented by Travellers to and from London".

The town was broadly Parliamentarian in the Civil War, but was in Royalist hands.
Wardour Castle fell to Parliamentary forces in 1643; Parliamentary forces surrounded the town in August 1645, when it was a centre of local clubmen activity.
The clubmen were arrested and sent to trial in Sherborne.
Shaftesbury took no part in the Monmouth
There is no substantive evidence that Shaftesbury was the "Caer Palladur" (or "Caer Palladwr") of Celtic and Roman times, and instead the town's recorded history dates from Anglo-Saxon times. By the early 8th century there was an important minster church here, and in 880 Alfred the Great founded a burgh (fortified settlement) here as a defence in the struggle with the Danish invaders. The burgh is recorded in the early-10th-century Burghal Hidage as one of only three that existed in the county (the others being at Wareham and 'Bredy' - which is probably Bridport).
In 888 Alfred founded Shaftesbury Abbey, a Benedictine nunnery by the town's east gate, and appointed his daughter Ethelgifu as the first abbess. Æthelstan founded two royal mints, which struck pennies bearing the town's name, and the abbey became the wealthiest Benedictine nunnery in England. On 20 February 981 the relics of St Edward the Martyr, the teenage King of England, were transferred from Wareham and received at the abbey with great ceremony, thereafter turning Shaftesbury into a major site of pilgrimage for miracles of healing.
King Canute died here in 1035, though he was buried at Winchester. Edward the Confessor licensed a third mint for the town. By the time of the Norman conquest in 1066 Shaftesbury had 257 houses, though many were destroyed in the ensuing years of conflict, and by the time the Domesday Book was compiled twenty years later, there were only 177 houses remaining, though this still meant that Shaftesbury was the largest town in Dorset at that time. Around this time the town's ownership was equally shared between king and abbey. In the first English civil war (1135-1154) between Empress Matilda and King Stephen, an adulterine castle or fortified house was built on a small promontory at the western edge of the hill on which the old town was built. The site on Castle Hill, also known locally as Boltbury, is now under grass and is a scheduled monument.
In 1240 Cardinal Otto (Oddone di Monferrato), legate to the Apostolic See of Pope Gregory IX visited the abbey and confirmed a charter of 1191, the first entered in the Glastonbury chartulary. During the Middle Ages the abbey was the central focus of the town; the abbey's great wealth was acknowledged in a popular saying at the time, which stated that "If the abbot of Glastonbury could marry the abbess of Shaftesbury their heir would hold more land than the king of England". In 1260 a charter to hold a market was granted. By 1340 the mayor had become a recognised figure, sworn in by the steward of the abbess. In 1392 Richard II confirmed a grant of two markets on different days. Edwardstow, Shaftesbury's oldest surviving building, was built on Bimport at some time between 1400 and 1539. Also in this period a medieval farm owned by the Abbess of Shaftesbury was established, on a site now occupied by the Tesco supermarket car park.
In 1539, the last Abbess of Shaftesbury, Elizabeth Zouche, signed a deed of surrender, the (by then extremely wealthy) abbey was demolished, and its lands sold, leading to a temporary decline in the town. Sir Thomas Arundell purchased the abbey and much of the town in 1540, but when he was later exiled for treason his lands were forfeit, and the lands passed to Pembroke then Anthony Ashley-Cooper, 7th Earl of Shaftesbury, and finally to the Grosvenors.
Shaftesbury was a parliamentary constituency returning two members from 1296 to the Reform Act of 1832, when it was reduced to one, and in 1884 the separate constituency was abolished.
In Survey of Dorsetshire, written in about 1630 by Thomas Gerard of the Dorset village of Trent, Shaftesbury is described as a "faire Thorough Faire, much frequented by Travellers to and from London".
The town was broadly Parliamentarian in the Civil War, but was in Royalist hands. Wardour Castle fell to Parliamentary forces in 1643; Parliamentary forces surrounded the town in August 1645, when it was a centre of local clubmen activity. The clubmen were arrested and sent to trial in Sherborne. Shaftesbury took no part in the Monmouth 
Shaftesbury