What do you mean by it rots?
If you mean the tap root rots before the seed sprouts, then the medium is too moist and your environment is not drying it out fast enough - make sure your lights are turned on above your soil to help warm it up. A sprouting seed doesn't need a lot of water to pop, so sitting in moist soil for hours with low oxygen will suffocate it.
If you mean that your seed sprouts, then the seedling stem rots and dies, that's called damping off and is due to a fungal infection. This means the soil you are using is not very clean. I would recommend never reusing soil unless you know how to properly clean, sterilize, and recharge soil.
Here is what I would recommend to increase your success rate that minimizes other factors like soil disease or overwatering:
You will need 2 main supplies, 3% hydrogen peroxide & optionally peat moss pellets (a.k.a. "rapid rooters")
1. Put the seeds in a cup that is made up of 2 parts water, and 1 part 3% hydrogen peroxide - this creates a 1% hydrogen peroxide solution. Place the seeds in the water. If any sink, they are duds, they should all float. The peroxide oxygenates the water a bit but MOSTLY is there to kill bacteria, however, scientific trials have proven and documented in white papers that a 1% hydrogen peroxide solution increases germination rates significantly in the first 24 hours.
2. Put the cup in a dark place, like a kitchen cabinet, and leave it alone for 48 full hours. Do not disturb it. During this time the seed is floating, meaning it has access to both water and oxygen outside the water. If you poke them to make them fall, they lose their oxygen source - so it's very important to not disturb the cup and let them float until you remove them.
3. Ready your soil in a container, place your seed into it taproot down, with the seed just BARELY poking out of the soil. Gently add about 100ml of water to the planting site.
(Alternative using rapid rooters: Dip peat moss/rapid rooters into water until they're soaked thoroughly. Squeeze all the water out and place your seed taproot in it and nestle it into some soil in a cup. They're sterile and provide a great starting point for seedlings.)
4. Place the containers under your light source, not too high - around 200 ppfd - and within 48 hours you should have a seedling ready to grow :)