The correct order is to first visit the Yamunotri Dham, then Gangotri Dham, followed by Kedarnath Dham, and finally Badrinath Dham.