What you put on a rat trap varies, depending on several factors. For one thing it is determined by exactly what kind of rodent you are dealing with, as there are many more pests than just rats. It can also depend on what type of trap you are using to catch the pest.
Identify the Rodent
It may not be a rat you are catching. It may in fact be a mouse, or simply a severe insect problem. One way to check is by baiting the trap using the appropriate lure and surrounding it with a thin layer of flour on the flour. Later, when the bait has been taken, the pest will have walked through the flour, leaving a trail. It is important to correctly identify the pest as a rat trap will not catch a mouse, and a mouse trap will not catch a rat. Neither, of course, will catch insects.
Practical Concerns About Bait
Whatever bait you use, it should fit several criteria to make it effective. The bait should not be easy to remove from the trap, resulting in increased effort and strain on the traps trigger. This gives the trap's mechanism more time to spring on the pest. To do this, the bait should be something sticky. If that is not possible, then tie the bait down to the trap. Solid bait can be tied with thread -- or in some cases, melted.
Rats like sweet foods. There are many that are effective as bait. Marshmallows are one food that will lure a rat. This falls can be melted onto the trap. The same applies to chocolate, another effective rat bait. One of the more common rat baits is peanut butter, which is sticky and impossible for the rat to move in one lump. This will result in it spending time on the trap.
A rat will be lured by cheese, but a mouse will not. Many smelly foods are very effective as rat bait. Fish is one example. Fish is difficult to secure to the trap however, as even when tied down, it may simply break apart. Garlic sausage is another food that rats will be attracted to, and it is easier to secure. Bacon is another meat that rats will climb onto the trap for.