Please make sure to lock the door.

Literal

Certainly door [to-に] key [object-を] locking [manner-ようにして] [polite-request-ください].

鍵を掛けるようにして下さい uses ようにする ('make sure to'). A safety instruction that's polite and thorough.