Our chickens kept laying their eggs on the bottom of their hen house. It isn't good for the eggs to be laid outside of the nesting box for multiple reasons. They are at risk of getting broken, which can lead to the chickens eating the eggs and they are more likely to get pooped on.
We tried numerous things without results. Finally we decided to buy some porcelain eggs, which look and feel like real eggs. We placed them in the nesting boxes and added extra bedding for additional comfort.
After about a week, one of the chickens kicked the fake eggs out and laid her eggs the nesting box! The other chickens followed her lead and all of our eggs have been in the boxes ever since.
This page contains the following solutions.
If your chickens are not laying their eggs in the nesting box you can give this trick a try. Take a few of their eggs, mark them with an "x", and place them in the nesting box.