The city is located in the southeast of Wiltshire, near the edge of Salisbury Plain. Its cathedral was formerly located to the north at Old Sarum; following its relocation, a settlement grew up around it, drawing residents from Old Sarum and Wilton. The new town received its city charter in 1227 under the name , which continued to be its official name until 2009, when the Salisbury City Council was established. It sits at the confluence of five rivers: the Nadder, Ebble, Wylye, and Bourne are tributary to the Hampshire Avon, which flows to the south coast and into the sea at Christchurch in Dorset. Salisbury railway station serves the city and is a regional interchange, marking the crossing point between the West of England Main Line and the Wessex Main Line.
Stonehenge, a UNESCO World Heritage Site, is about northwest of Salisbury and greatly aids the local economy. The city itself, Old Sarum, the present cathedral and the ruins of the former one also attract visitors.
The hilltop at Old Sarum lies near the Neolithic sites of Stonehenge and Avebury and shows some signs of early settlement. It commanded a salient between the River Bourne and the Hampshire Avon near a crossroads of several early trade routes. During the Iron Age, a hillfort (oppidum) was constructed around it sometime between 600 and 300 . The Romans may have occupied the site or left it in the hands of an allied tribe. Amid the Saxon invasions, Old Sarum fell to King Cynric of Wessex in 552. Preferring settlements in bottomland like nearby Wilton, the Saxons largely ignored Old Sarum until the Viking invasions led to restore its fortifications. Along with Wilton, however, it was abandoned by its residents to be sacked and burned by the Dano-Norwegian king Sweyn Forkbeard in 1003. It subsequently became the site of Wilton's mint. Following the Norman invasion, a motte-and-bailey castle was constructed by 1070. The castle was held directly by the Norman kings; its castellan was generally also the sheriff of Wiltshire.
In 1075, the Council of London established Herman as the first bishop of Salisbury, uniting his former sees of Sherborne and Ramsbury into a single diocese which covered the counties of Dorset, Wiltshire, and Berkshire. (He had earlier planned to move his seat to Malmesbury but was blocked by its monks and Earl Godwin.) Hermann and his successor Saint Osmund began the construction of the first Salisbury cathedral but neither lived to see its completion in 1092. Osmund was a cousin of William the Conqueror and Lord Chancellor of England; he was responsible for the codification of the Sarum Rite, the compilation of the Domesday Book (which was probably presented to William at Old Sarum), and—after centuries of advocacy from Salisbury's bishops—was finally canonized by Pope in 1457. The cathedral was consecrated on 5 April 1092 but suffered extensive damage in a storm, traditionally said to have occurred only five days later. Bishop Roger was a close ally of who served as his viceroy during the king's absence to Normandy and directed the royal administration and exchequer along with his extended family. He refurbished and expanded Old Sarum's cathedral in the 1110s and began work on a royal palace during the 1130s, prior to his arrest by Henry's successor Stephen. After this arrest, the castle at Old Sarum was allowed to fall into disrepair but the sheriff and castellan continued to administer the area under the king's authority.
Bishop Hubert Walter was instrumental in the negotiations with Saladin during the Third Crusade, but he spent little time in his diocese prior to his elevation to archbishop of Canterbury. The brothers Herbert and Richard Poore succeeded him and began planning the relocation of the cathedral into the Salisbury Plain almost immediately. Their plans were approved by but repeatedly delayed: Herbert was first forced into exile in Normandy in the 1190s by the hostility of his archbishop Walter and then again to Scotland in the 1210s owing to royal hostility following the papal interdiction against . The secular authorities were particularly incensed, according to tradition, owing to some of the clerics debauching the castellan's female relations. In the end, the clerics were refused permission to reënter the city walls following their rogations and processions. This caused Peter of Blois to describe the church as "a captive within the walls of the citadel like the ark of God in the profane house of Baal". He advocated
His successor and brother Richard Poore who finally removed the cathedral to a new town on his estate at Veretes Sarisberias ("Old Salisburies") in 1220. The site was at "Myrifield" ("Merryfield"), a meadow near the confluence of the River Nadder and the Hampshire Avon. It was first known as "New Sarum" or . The town was laid out on a grid.
Work on the new cathedral building—the present Salisbury Cathedral—began in 1221. The site was supposedly established by shooting an arrow from Old Sarum, although this is certainly a legend: the distance is over . (The legend is sometimes emended to claim that the arrow struck a white deer, which continued to run and died on the spot where the cathedral now rests.) The structure was built upon wooden faggots on a gravel bed with unusually shallow foundations of and the main body was completed in only 38 years. (The tall spire, the tallest in the UK, was built later.) With royal approval, many of the stones for the new cathedral were taken from the old one; others came from Chilmark. They were probably transported by ox-cart owing to the obstruction to boats on the River Nadder caused by its many weirs and watermills. The cathedral is considered a masterpiece of Early English architecture. The spire's large clock was installed in 1386, the oldest surviving mechanical clock in Britain. The Cathedral also contains the best-preserved of the four surviving copies of the Magna Carta.
New Sarum was made a city by a charter from in 1227 and, by the 14th century, was the largest settlement in Wiltshire. The city wall surrounds the Close and was built in the 14th century, again with stones removed from the former cathedral at Old Sarum. The wall now has five gates: the High Street Gate, Gate, the Queen's Gate, and Gate were the original ones while a fifth was constructed in the 19th century to allow access to Bishop Wordsworth's School in the Cathedral Close. During his time in the city, the composer Handel stayed in a room above St Ann's gate. The original site of the city at Old Sarum, meanwhile, fell into disuse. It continued as a rotten borough: at the time of its abolishment during the reforms of 1832, its MP represented three households.
In May 1289, there was uncertainty about the future of Margaret, Maid of Norway, and her father sent ambassadors to Edward I. Edward met Robert the Bruce and others at Salisbury in October 1289, which resulted in the Treaty of Salisbury, under which Margaret would be sent to Scotland before 1 November 1290 and any agreement on her future marriage would be delayed until she was in Scotland.
In 1450, a number of riots broke out in Salisbury at roughly the same time Jack Cade led a famous rebellion through London. The riots occurred for related reasons, although the declining fortunes of Salisbury's cloth trade may have also been influential. The violence peaked with the murder of the bishop William Ayscough, who been involved with the government. In 1483, a large-scale rebellion against Richard III broke out, led by his own 'kingmaker', Henry Stafford, 2nd Duke of Buckingham. After the revolt collapsed, Buckingham was executed at Salisbury, near the Bull's Head Inn. In 1664, an act for making the River Avon navigable from Christchurch to the city of New Sarum was passed and the work completed, only for the project to be ruined shortly thereafter by a major flood. Soon after, during the Great Plague of London, Charles II held court in Salisbury's cathedral close.
Salisbury was the site chosen to assemble James II's forces to resist the Glorious Revolution. He arrived to lead his approximately men on 19 November 1688. His troops were not keen to fight Mary or her husband William, and the loyalty of many of James's commanders was in doubt. The first blood was shed at Wincanton, in Somerset. In Salisbury, James heard that some of his officers had deserted, such as Edward Hyde, and he broke out in a nosebleed which he took as an omen that he should retreat. His commander in chief, the Earl of Feversham, advised retreat on 23 November, and the next day John Churchill deserted to William. On 26 November, James's own daughter, Princess Anne, did the same, and James returned to London the same day, never again to be at the head of a serious military force in England.
At the time of the 1948 Summer Olympics, held in London, a relay of runners carried the Olympic Flame from Wembley Stadium, where the Games were based, to the sailing centre at Torbay via Slough, Basingstoke, Salisbury, and Exeter.
The 1972 Local Government Act eliminated the administration of the City of New Sarum under its former charters, but its successor—Wiltshire County's Salisbury District—continued to be accorded its former city status. The name was finally formally emended from "New Sarum" to "Salisbury" during the 2009 changes occasioned by the 1992 Local Government Act, which established the Salisbury City Council.