What is the setting of The Scarlet Letter?

Nathaniel Hawthorne had deep bonds with his Puritan ancestors and created a story that highlighted both their weaknesses and their strengths. His knowledge of their beliefs and his admiration for their strengths were balanced by his concerns for their rigid and oppressive rules. The Scarlet Letter shows his attitude toward these Puritans of Boston in his portrayal of characters, his plot, and the themes of his story.
The early Puritans who first came to America in 1620 founded a precarious colony in Plymouth, Massachusetts. While half the colonists died that first year, the other half were saved by the coming spring and the timely intervention of the Indians. These first settlers were followed ten years later by a wave of Puritans that continued in the 1630s and thereafter, until, by the 1640s, New England had over 25,000 English settlers. The second group in the 1630s settled in the area of present-day Boston in a community they named Massachusetts Bay Colony. It is this colony that forms the setting of The Scarlet Letter.