Perfect Ending

Ruby Caverns and Emerald Chambers both have a "real" ending. Reaching this ending considers your playthrough as "complete", and canonically, the bosses are replaced by Illusions (not mentioned in-game, but basically, the boss has left the dungeon, and created an illusion to fight instead). Both Perfect Endings are very hard to reach, either requiring a large number of successful runs, or one really well-performed one.

Below are the steps to take if one desires to beat the Dungeon, free the Gods, and close off the area's for good. Note: naturally, you can still play as normal once you've reached these endings!

Ruby Caverns: "Free at Last"

 * Step 1: Beat the game.
 * This can be done with any character, in any way, with any unlocks. Reaching the Good Ending (grab the medal, race to the entrance, don't die) is all that matters.
 * Step 2: Unlock the NPC Shades.
 * You can find him after getting the Good Ending, and playing at least 17 runs, not including bonus counts for boss beatings (2 runs per boss). He is the last NPC in the Dungeon, found in Hell.
 * Step 3: Complete the challenge Darkest Dungeon.
 * Toggled by talking to Shades. This is by far the easiest step, as the "challenge" is very easy and you almost cannot die at all.
 * Step 4: Talk to Shades again.
 * He will explain what the challenge did, and a little about the bosses' backgrounds. Disable the challenge after this as well.
 * Step 5: Beat all minibosses, and claim their recipes.
 * From now on, if you haven't unlocked it yet, a miniboss will drop a recipe corresponding to a boss: Iron Ladder, Golden Key, Diamond Spell, Void Lock.
 * Step 6: Craft the recipes before the corresponding boss.
 * It will trigger an different, unskippable cutscene that allows the boss of the floor to leave to freedom. You do not have to fight him. This step can be done in any run, giving the option to skip any boss.
 * Step 7: Free all 4 bosses in one run, and return to the surface.
 * A cutscene will start, where the the four bosses (especially Raimor) congratulate the player for freeing them, and making the right choice. They leave, and you can finally rest.

Emerald Chambers: "Finally Found"

 * Step 1: Enter the Stringed Caves.
 * As the first secret area, it's really simple to access: remove the four webs next to the trapdoor in the middle, in a room with cobwebs in the Deep Woods.
 * Step 2: Obtain the Void Opener.
 * It's in a room in the Stringed Caves, easy to grab.
 * Step 3: Enter Dungeon Deep.
 * This is opened by solving a redstone puzzle in the Waygate Tunnels. It's possible to do fully turn-based, but if you move quickly from the pressure plate to a lever it may be easier. Opening the trapdoor once will destroy it, allowing access.
 * Step 4: Obtain the Void Crasher.
 * Same concept as the previous one: it's on a pedestal somewhere.
 * Step 5: Enter the Ancient Tomb.
 * Harder to access, in the Hall of the Dead, you may notice you cannot move onto the tile you start the floor on. This is actually a Grave: Using it makes a Spirit appear (kill it!), and one Glass. Pick up the glass and carry it to a tomb room, then Use the empty place on top of it; this will open the Tomb. Getting hit while carrying the Glass makes it disappear; drop it before combat, and move slowly!
 * Step 6: Obtain the Void Locker.
 * Do I really need to explain this one?
 * Step 7: Enter the Void.
 * In the Lost Ruins, a floating 7x7 room always appears. Holding the Void Opener, walking close will open the portal to the Void. Walk on it the enter the secret eleventh floor...
 * Step 8: Defeat Dionae
 * It cannot be very hard: the Void is empty, and the boss has a lot of health, but her attacks are relatively weak to what you've seen so far. She has two phases. Enough tricks should bring her down...?
 * Step 9: Watch the cutscene
 * If you also have both the Void Crasher and the Void Locker, a special cutscene triggers where Dionae shows you the Medal and stores it, locking the Void in the process. She is free, teleports you both away from the Dungeon, and your run restarts with a win message!