It is generally not recommended to put oven racks in the dishwasher. Most oven racks are made of metal, and the high heat and harsh detergents used in dishwashers can cause discoloration, warping, or damage to the racks. Additionally, the size and shape of oven racks may not fit properly in dishwasher compartments, potentially causing damage to the dishwasher itself.
It is best to clean oven racks by hand using a non-abrasive cleaner, warm water, and a sponge or soft cloth. You can soak the racks in warm, soapy water to help loosen any baked-on residue, and then scrub them gently to remove any remaining dirt or grease. Rinse them thoroughly and allow them to dry before placing them back in the oven.
If your oven racks are particularly dirty or greasy, you can also try using specialty oven rack cleaners or using a paste made from baking soda and water to help remove stubborn stains. Be sure to consult the manufacturer's instructions for your specific oven model for any recommended cleaning methods.