Stockport is a large town in Greater Manchester, England, 7 miles (11 km) south-east of Manchester city centre, where the rivers Goyt and Tame merge to create the River Mersey. It is the largest town in the metropolitan borough of the same name.
Most of the town is within the boundaries of the historic county of Cheshire, with the area north of the Mersey in the historic county of Lancashire. Stockport in the 16th century was a small town entirely on the south bank of the Mersey, known for the cultivation of hemp and manufacture of rope. In the 18th century, it had one of the first mechanised silk factories in the British Isles. Stockport's predominant industries of the 19th century were the cotton and allied industries. It was also at the centre of the country's hatting industry, which by 1884 was exporting more than six million hats a year; the last hat works in Stockport closed in 1997.
Dominating the western approaches to the town is Stockport Viaduct. Built in 1840, its 27 brick arches carry the mainline railways from Manchester to Birmingham and London over the River Mersey.

No part of Stockport appears in the Domesday Book of 1086. The area north of the Mersey was part of the hundred of Salford, which was poorly surveyed. The area south of the Mersey was part of the Hamestan hundred. Cheadle, Bramhall, Bredbury, and Romiley are mentioned, but these all lay just outside the town limits. The survey includes valuations of the Salford hundred as a whole and Cheadle for the times of Edward the Confessor, just before the Norman invasion of 1066, and the time of the survey. The reduction in value is taken as evidence of destruction by William the Conqueror's men in the campaigns generally known as the Harrying of the North. The omission of Stockport was once taken as evidence that destruction was so complete that a survey was not needed.[11]
Arrowsmith argues from the etymology that Stockport may have still been a market place associated with a larger estate, and so would not be surveyed separately. The Anglo-Saxon landholders in the area were dispossessed and the land divided amongst the new Norman rulers. The first borough charter was granted in about 1220 and was the only basis for local government for six hundred years.
A castle held by Geoffrey de Costentin is recorded as a rebel stronghold against Henry II in 1173–1174 when his sons revolted. There is an incorrect local tradition that Geoffrey was the king's son, Geoffrey II, Duke of Brittany, who was one of the rebels.[12] Dent gives the size of the castle as about 31 by 60 m (102 by 197 ft), and suggests it was similar in pattern to those at Pontefract and Launceston. The castle was probably ruinous by the middle of the 16th century, and in 1642 it was agreed to demolish it. Castle Hill, possibly the motte, was levelled in 1775 to make space for Warren's mill, see below.[13][14] Nearby walls, once thought to be either part of the castle or of the town walls, are now thought to be revetments to protect the cliff face from erosion.[15]