If some how the sorted order has changed, you can revert back the sorting to "Added Order" from the toolbar.
or, choose All Photographs and click on View menu and Sort to choose the sorting order.
Also, here is the tutorial link to learn about creating web gallery in Lightroom:
What order to they result in?
If you are talking about Web module, then the order of the images in Web module will appear in the same order as in Library module.