National Highways is set to carry out essential bridge repairs on the A64 at Flixton Carr Bridge, which crosses the River Hertford, between Staxton and Seamer.
The maintenance will re-waterproof the bridge, replace the expansion joints which absorb its natural movement, resurface the carriageway and renew road markings and studs.
The A64 will be closed in both directions between Staxton Roundabout and the small roundabout which connects the A64 and Main Street/B1261 for the whole weekend starting at 8pm on Friday, September 17 and 6am on Monday, September 20.
Local access that goes beyond the road closures is still permitted.
Michael Hoult, National Highways project manager said: "Our work will make sure the carriageway is well maintained and protected from the weather which reduces the need for future roadworks in the area.
"We are doing it in term time after the school summer holidays, to reduce the impact on nearby tourist attractions and have worked closely with the local authority to devise a diversion route to minimise the impact of traffic on this rural community."
Drivers are advised to plan their route and allow for extra travel time as a 22-mile diversion will be in place, which has been agreed with police and North Yorkshire County Council, and will increase travel times by up to 40 minutes.
Drivers leaving South from Scarborough will be diverted at the A64 and Main Street/B1261 roundabout along the B1261 through Seamer to the A170/Pickering Road at East Ayton before joining the A169/Malton Road at Pickering to then rejoin the A64 at Old Malton.
Nearby residents could be affected by noisy equipment during the work, but National Highways say "all efforts will be made to complete the noisiest part of the work before 11pm whenever possible."
The repair work is weather dependent and cannot be carried out in persistent rain. National Highways said if wet weather halts the repairs the work will be rearranged and the road reopened.