A flange connects the bottom of the toilet to the downpipe in the bathroom floor. If there is a leak from under the toilet, you may need to replace this ring.
Steps

Step 1. Place newspapers or towels on the floor next to the bathtub
You will place the toilet on them when you remove it from the flange.

Step 2. Shut off the water supply to the toilet

Step 3. Disconnect the water supply hose

Step 4. Flush the toilet to empty it

Step 5. Use your hands or a wrench to unscrew the two bolts that secure the toilet bowl to the floor
Put them in a safe place as you will need them later to screw the toilet back on.

Step 6. Remove the toilet and place it on top of the newspapers or towels you already used to cover the floor

Step 7. With a spatula, clean the o-ring wax

Step 8. Use a screwdriver to unscrew the screws that secure the flange to the floor

Step 9. Pull out the flange and rinse it in a sink or clean it with a disinfectant

Step 10. Take a rag and plug it tightly into the sewer pipe to block the access of unpleasant sewer gases

Step 11. Use a measuring tape to measure the diameter of the sewer pipe to find out what size the new flange should be

Step 12. Take the flange to a tool store or plumbing store and purchase a flange of the same size and shape

Step 13. Along with the flange, buy a new O-ring wax

Step 14. Remove the rag from the sewer pipe

Step 15. Bolt the new flange to the floor
New bolts will attach the flange to the bottom of the toilet.

Step 16. Use a screwdriver and new screws to screw the new flange to the floor

Step 17. Lift the toilet and place the new wax ring in place on the bottom

Step 18. Place the toilet on the flange, aligning the toilet with the new bolts
Press firmly to seal the ring.

Step 19. Install the bolts that hold the toilet bowl to the flange
Tighten the bolts first by hand, then tighten securely with a wrench.

Step 20. Connect the water supply hose

Step 21. Turn on the water supply to the toilet

Step 22. Rinse off the water to make sure it is working and there is no leakage
Advice
- If, after discovering a leak under the toilet, you removed it, you may find that everything is in order with the flange. In this case, simply replace the wax ring and check if that solves the leak problem.
- Instead of putting the toilet on top of newspapers and towels, which will make them wet, you can put it in the bathroom or shower stall.