The book is one of Hardy's Wessex novels, and is set largely in the fictional town of Casterbridge, based on Dorchester in Dorset.[2] The author intended Casterbridge to be an imaginative presentation of certain aspects of the town as he remembered it in the "dream" of his childhood.[3]
Although the opening sentence of the novel states that the events described took place "before the nineteenth century had reached one-third of its span" the date of Hardy's own childhood places it rather later – in the mid-to-late 1840s.[4][3]