Halifax is located in western Dauphin County at (40.467623, −76.931156), on the east bank of the Susquehanna River. Pennsylvania Route 147 passes through the borough, leading north along the Susquehanna to Millersburg and southwest to U.S. Route 22 near Duncannon. Pennsylvania Route 225 leads northeast from Halifax to Elizabethville. It follows PA 147 south out of Halifax, then splits off to head south over Peters Mountain to Dauphin, south of Halifax.