To prevent waterlogging and root rot, ensure that your herb containers have proper drainage. Place a layer of small rocks or pebbles at the bottom of the containers before adding the potting soil. This will help excess water to drain away effectively.