This guide assumes you've read the main article on wells and are familiar with the basic information found in that article, of what a well does and what is required to build one.
A well can be vital to any fortress, but deciding that you need one and building one are two different things. Draining water from the surface can flood your fortress if you aren't careful, and building a well only to see the water source dry up or freeze is beyond frustrating. This guide will walk you through a number of different situations, and explain solutions that have been found for these problems. If you are looking for the step by step guide: see below.
 Why Build a Well?
Honestly, not every fortress NEEDS a well. But they all need some form of safe water source to bring water to patients and prisoners. If they do not have this and you find yourself in a siege with six injured dwarves, you're in for a little bit of Fun... But a hole full of water can be just as good for that as a well.
 Why You Might Not
1. Wells are currently a little wonky, like everything else, but in a not-so-friendly way. There are plenty of opportunities to flood a fortress through a well, and even if you don't, dwarves and animals might still occasionally fall in.
2. They take a lot of time and effort to construct, especially when compared to alternatives.
3. Because of the way wells are, a single hole in a flat ceiling, it makes it more difficult for creatures to get out, should they find themselves in your water source.
4. Technically, tiles adjacent to a trench full of water can be designated as a water source just as easily as a well, and dwarves will sanely path around such a trench, as well as bathe in it more easily.
5. If you do make a shallow pool as a water source, and have a meeting hall designated therein, unoccupied dwarves will hang out in the water, gaining swimming skill.
 Why You Might
1. While a trench full of water can be used as a water source, a well can draw water from a source that is 30+ levels below. Also, a trench water source can only be one level deep, dwarves will not draw water from any level deeper than that. A well will.
2. Wells can be made to have extraordinarily high value, due to the various skills and materials, each with their own quality levels, which go into its construction. Thus, as the center piece for a meeting room, even if they have no water, wells can be very handy in making dwarves very happy.
3. As far as the well itself goes, they take up very little space in your actual fortress. With a water-filled channel, the reservoir is equivalent to the floor space occupied.
4. This is a glitch, but wells are the easiest method for making salt water drinkable. Wells will ignore salinity and allow dwarves to drink salt water directly from its source without a glitch. So long as it isn't murky.
 Choosing a Location
Once you've decided it's time to construct a well, you need to consider where the well needs to be. It helps if you've been planning for this while building the rest of your fortress, and have made room for it.
You want a well central to your dwarves, so they'll all get good thoughts from seeing it, and near any hospital beds you have, but you want it off the main traffic routes. You can have more than one well, which solves that problem, but raises the one of engineering water to feed them all. If it's indoors (or behind walls), then there's little threat from carp, goblins, or animals, and it can provide a safe source of drinking water during a siege.
Depending on your start location, you may already have a pre-existing water source, such as a flooded cavern, which you can just build a well over. Or, as is usually the case, you may need to transport water from some other location to where you want your well to be. This is where things get complicated.
 Water sources
A well needs a water source of at least 3/7 depth, at least 1 z-level somewhere directly below its opening, with no obstructions between itself and said water. Pre-existing water is safe because it's the most predictable - what you see is what you've got, no surprises. You can instead use dwarven engineering to bring water from a distant source to beneath your well, with a safety factor based on your experience and the complexity of the project. (See flood.)
The important part about the well is to make sure that you don't create a situation where the water will flood your fortress, due to pressure from a source at a higher level. If the water is stable before you build the well above it, it will be safe (unless your dwarves change things), but if you are introducing a flow, make sure you understand how dwarven pressure works and will not fall victim to its surprises. (See pressure.)
 Pre-existing sources
A brook, river, murky pool, or cavern lakes can provide water under a well. If the water source is only one z-level deep and contains a pile of mud, the water produced will be muddy. 'A dusting of mud', however, is not an issue - your well and its water are
The surface of a brook tile will have to be channeled out, but it otherwise works just fine.
Murky pools are not optimal: they can dry up in warm seasons, and water directly from murky pools is stagnant, which is just as bad as being muddy. Murky pools can refill from rain, but on hot maps, this may never happen.
If you have an aquifer, just channel a 1x1 square in any open stretch of floor above it and build the well. It will automatically fill and never flood. You'll have other construction projects to worry about.
Water coming into contact with a floor or slope may create "a dusting of mud". However, both 'A dusting of mud' and a 'Muddy Upward Slope' are not an issue - your well and its water are
Oceans and aquifers near oceans carry salty water. This is normally unusable for treating wounds or drinking. However, salty water obtained from a well is used just like normal. This is a bugBug:1260.
If you need to move water to your well, you need to dig/build a reservoir. A reservoir is basically a big hole intended for the storage of large quantities of water.
When digging a reservoir, you need to consider your needs and the space you have available. Do you really need a 20x20x20 reservoir, holding 56,000 tiles of water, requiring 560,000 uses of the well to fully dry up? Frequently, in well-managed fortresses, wells are really only used for the care of sick or imprisoned dwarves and animals. As a result, it doesn't really need to be anything special, unless it's a meeting hall, in which case dwarves will drink from it at random.
Another consideration is safety. Specifically, dwarves fighting near wells can fall into them, whether as a result of sparring or due to overcrowding of animals. You may wish to place some sort of escape route from the well, should anyone do so. At the least, this just needs to be a staircase going up the side of the well to the surface. The shorter the distance they need to go, the better off they are. Keep in mind, of course, that if any wildlife is able to access your reservoir, and if any of them are able to leave the water, they may wander into your fortress through the escape route. If they're particularly malicious, they may even path their way in to attack your dwarves.
If you are filling the reservoir by aqueduct, consider the fill point. If you are using only gravity to fill the well, but the water needs to flow up to do so, you may experience problems when it comes time to refill your well. Specifically, water floods upwards into empty space very easily, but for some reason doesn't like to flood through still water. Thus, it may be more appropriate to have the reservoir fill from its top, though keep in mind that this is a very fast fill method and can flood a bit if you aren't watching and have a small reservoir. (As a side note on that, it is possible to fill a well by pouring water directly through the well opening itself)
Finally, you may find some circumstance where you'd wish to make changes to the well. For example, building a statue in its reservoir, or recovering a lost loved one who fell in and cracked his skull open. In these instances, you may wish to construct a manual drain. All it requires is a hatch or floodgate at the bottom of the well, connected to a lever, covering a tunnel leading to an appropriate dump site... Like your subterranean farming operation. Or your obsidian factory. Or a room full of captured
nobles goblins. If you already have a drain for the aqueduct, you can easily connect the two.
 Filling the Well
If you've had to construct a well separate from a pre-existing water source, you need to move that water to the well itself. There's two main ways to go about this.
 Bucket Filling a Well
If you designate your well as a pit/pond and have empty buckets, dwarves will fill the well manually. Keep in mind that this is slow, time-consuming and occupies dwarves who could be doing something else. Of course, for particularly small wells, it may be of no concern. If the walking distance is quite far, (Like STUPIDLY far- your fortress would need to be a truly tangled maze for this to happen) the water may evaporate faster than dwarves can fill the well.
 Piping water to your reservoir
If the water is not where you want to build the well, you can dig a tunnel or channel and/or otherwise create an aqueduct to bring it to where you want it. You should consider adding a door or floodgate somewhere near the water source so that you can dry out your tunnels for future projects, repair, or recovery of lost items.
Channels are open to the sky, and if not done properly, (taking advantage of some weird quirks in game functionality) they are subject to evaporation and freezing. As a result, they aren't normally an optimal method of moving water. Of course, there's nothing stopping you from digging a moat, then filling your well from that. Keep in mind, however, that open water frequently becomes a random hazard, as dwarves can be quite careless at times. If you do have open water set up somewhere, make sure your dwarves have some way out of it. You never know when a random goblin will kick your elite stonecrafter into your moat.
Digging tunnels, then, is generally a better way of moving water from place to place. You need to be careful about how you dig such aqueducts. Water can move through diagonal openings, so be sure to avoid flooding nearby rooms from accidental corner intersections. Make sure that any unnecessary access points to your aqueduct are properly sealed before letting the water flow.
The generally accepted method for digging an aqueduct has five steps.
1. Dig out the reservoir where you want to store the water.
2. From the reservoir, dig a tunnel up to your water source, but leave one space of earth to prevent water from flooding in and killing your dwarf.
3. Build a door or floodgate in the aqueduct, either at the end of the tunnel or at the entrance to the reservoir. Or both if you're fancy. (Doors are better, because the dwarf can walk through it if he builds it from the wrong side)
4. Connect the door/floodgate to a lever, and make sure any dwarves stuck in the tunnel are safely evicted.
5. Channel out the final tile from above, pull the lever. Let the water fill the reservoir, then pull the lever again, sealing the water source.
Keep in mind, when you command the lever to be pulled to end filling, it may take some time for an available dwarf to actually do it. Even then, there is some lag time between the lever pull and the action it causes. Finally, if your plug is at some point in the aqueduct, but not at the entrance of the reservoir, any water in the aqueduct above the water level in the reservoir will continue to pour in.
If you want to empty the aqueduct, use a similar method to build a drain to some reasonable dumping location, like a cavern. Make sure you can control it with levers, however, or it will constantly drain instead of filling your well.
A well is not an obstructing object. That is to say, it doesn't stop things from passing through its space. This is why wells can function through other wells, why water will flood out of them, and why a (very) few monsters may be able to climb out through them if you're tremendously unlucky.
More fortresses have fallen at the hands of a flooding well than they have to megabeasts, sieges or demons. If you are going to be shifting water around in any form other than buckets, be prepared for the worst.
There are several solutions to the flooding problem.
1. Overflow Drainage. At the top of a reservoir, dig a tunnel to drain water out the side, and have it dump out into some appropriate sump, like a cavern full of armok-knows-what.
2. Emergency auto-plug. You can make pressure plates sense water. If you set up a pressure plate beside your well, and connect it to a hatch or door blocking your reservoir, it will automatically seal the reservoir off from its flow source, should the thing flood.
3. No Exits. The safest and easiest way to do it, is to dig out the reservoir, but not the opening for the well itself. This way, you can fill the reservoir completely, and because there's nowhere for it to flood out to, it simply WON'T! Then you can seal off the reservoir at your leisure and dig the opening without concern! (Though not without caution. Make sure you turned the taps off first.)
You don't need to worry too much about monsters crawling out of your well to gobble down your hairy friends these days, but that doesn't mean it's impossible. It all depends on what beasts may be lurking around- and how you build your well.
First off, if you're bucket-filling a well, you need to make sure that their initial water source is safe. Make sure it isn't full of crocodiles or carp. (Or other dangerous fishy things)
If you are draining water through an aqueduct, and you know there may be dangerous animals (Or even just unwanted regular animals) living in it, there is a way to stop them from wandering in. You can place wall grates, upright bars, or fortifications in the aqueduct to act as filters. These allow water to pass through, but animals cannot. It has been observed that in very rare occasions, animal may be pushed through. If you're that concerned about it (Or have HORDES of angry crocodiles in your river) putting two filters in a row pretty much eliminates any chance of this happening. If you plan to use filters in conjunction with floodgates, remember to connect your floodgate to its trigger before placing the filters.
Even if monsters do get into your well, they're rarely a genuine threat, and at worst can give your dwarves an unhappy thought by scaring them. However, if your reservoir is filled right to the brim, carp and other fish CAN attack your dwarves, just as they would from a river. Also, any amphibious creatures may be able to use an escape passage to make their way into your fortress and make a mess. (Keep in mind, zombified fish are amphibious) And, of course, anyone who falls into a well full of predators is pretty much doomed.
To prevent amphibians from getting out of your well, should they somehow get there, simply put a lockable hatch over the escape route.
Finally, if you are drawing directly from a cavern lake, and have simply opened a hole in its ceiling for the well, any flying creatures in the cavern may be able to use the well as an access point to your fortress. You could potentially construct a wall surrounding the pathway of the bucket. This would prevent flying creatures from entering, unless they are also capable of swimming. Do not forget the perils of dwarves falling into a well, however, falling into a cavern lake full of cave crocodiles will cause lots of fun.
 Above Ground
The previous sections focused mostly on subterranean wells and gravity-filling reservoirs. Now we need to consider the special circumstances of wells built at ground level, above ground level, and simply outdoors.
The main problem is that anything above what was ground level at embark is considered "above ground" and has different behavior, even if enclosed to be indoors. In particular, it will freeze and evaporate according to the temperature. This includes everything on level 0 and -1, unless there is something about them preventing the temperature from removing them, like rivers flowing faster than the water can evaporate out of them.
Enclosing the water, so that it is "indoors" will decrease the rate of evaporation, but there isn't much you can do to prevent water from freezing above ground. (There is a way, but if you're new, you may not enjoy the prospects of actually constructing it.)
 Outdoor Wells
There are plenty of good reasons to build a well outdoors. First and foremost, to be decorative or thematic. The wells don't necessarily need to be functional if this is your intent. But another use would be as a functional source for an outdoor meeting hall... Or in other words, a vomitorium. Because dwarves will clean themselves in a well, having one in such a vomitorium would just make things more efficient!
Of course, as with any outdoor meeting place, you need to be certain that it is a safe place, where goblins and giant eagles are unlikely to descend upon your sickly party-goers.
 On The Level
Now, about ground level, or specifically, the place where "above ground" and "below ground" meet. Z-levels 0 and -1 on flat maps. If you are on a very cold or very hot map, any water open to the sky on these levels will freeze or evaporate very quickly. As said before, you can minimize this by simply roofing in the water and making it "indoors".
Also keep in mind the floor type. Murky pools, even when roofed over, will behave as though they are open to the sky. This is because murky pools, rivers, oceans, etc. all have a special floor tile which modifies the behavior of any water above it. Simply putting floor tiles on the basin of a murky pool can minimize evaporation, but it will eliminate rain refill.
If you dig a channel down to z-2, the water in it will not evaporate very quickly at all, as it's "under ground".
 In the Sky
And now for the final type of well, and this one is very uncommon, you may wish to build a well high above ground. A well tower may indeed be a cool, though completely non-functional idea. Be aware what the environmental conditions are before you do this, of course, as the only real way of dealing with ice involves pumping magma up the tower as well.
In all honesty, a sky well would be built and function pretty much the same as a subterranean well. The only difference is that it is very difficult to get the water up there. You need to build a pumpstack, lifting the water, level by level, pump by pump, up to your reservoir. And you need to lift the water to the top of your reservoir, as pumps will not pump upward naturally.
 Style and Design
This section discusses purely aesthetic and functional decisions people have made in the past with their wells, as well as advanced designs.
 Fighting the Ice
So you have a frozen well, and you want to know how to keep it liquid do ya? You're going to need to build a heated reservoir.
First, have magma on your map. If you don't, dig deeper and be prepared for Fun.
Next, you need some magma-safe materials. You'll need this to build floodgates and pumps.
Now, you need to pipe and pump the magma with the magma-safe pumping equipment. Be sure to use mechanical power for these, as dwarves are too likely to kill themselves.
The magma needs to be piped under your reservoir. That is to say, there needs to be just one floor tile between the two, just enough to keep them from touching and turning into an accidental obsidian factory.
The magma needs to be piped around under your water, it needs to keep on moving or the water will freeze again. That means it needs an infinite, cyclical flow.
And even if you get all of this built and working, it will only melt one level. Which means the reservoir can only be 1 level deep.
That's a lot of work to have an above-ground well in a frozen environment. Probably easier to melt a pool and drain it.
 Ultimate Party Machine
It is possible to pour water through the mouth of a well from above. This frequently causes water to spray out in a mist, which pleases dwarves. If you power it, you could have a pump stack draw water from beneath the well and pour it back in from above, turning your fancy meeting hall into a FANCIER meeting hall! Throw in some platinum statues while you're at it.
 Well Stacking
Have you ever needed to have more than one well on multiple z-levels and disliked the work of setting up multiple reservoirs? Well fret no more!
Because a well can function through the opening of another well, it's possible to stack well openings through z-levels! So long as they're all in a perfectly straight line above each other, and there's at least 3/7 tiles of water somewhere directly below them, they will all be perfectly functional!
Of course, if you go too far, this may become something of a safety concern, as dwarves would plummet mile after mile, through dozens of well openings before finally hitting the bottom.
 Multitasking Wells
Because wells aren't actually USED all that often, and are usually more valuable as decorations, there isn't really any reason to keep its reservoir completely full all the time. So, what can you do with a giant bucket of water in the middle of your fortress? Well, luckily, there are a few other reasons you could have for piping water around.
First, you need to "irrigate" stone floors before you can actually farm on them. Instead of making a separate, elaborate irrigation system for just one use, (mud doesn't dry naturally, though it could be smoothed/floored over and disappears when reclaiming a fortress) why not just drain it out of your well?
You could also use your well as a water reservoir for an obsidian factory. Fill a chamber with a single layer of magma, then pour your well's contents over it!
You could use your well to dispose of unwanted life forms, such as siegers, elves, goblins, nobles and other miscellaneous things that wandered into your cage traps. (This only works on non-amphibious creatures)
 The Dwarven Toilet
I built this in an experiment. At the top of the reservoir is a platform with a pressure plate on it. When the pressure plate senses 5/7 water, it triggers, closing the fill pipe, and opening the drain. So, when you pull the lever to fill the thing, it fills up to the top, then drains. Just like a giant toilet. I have not found any functional use for this. In all honesty, it was a simple accident I made, connecting the pressure plate to the drain as well as the plug. But, hey, what the heck, I made a giant toilet. There ya' go. Perhaps you could use this to get rid of the crud that accumulates in a well as dwarves clean themselves in it?
This can be VERY useful when you have a larger reservoir that fills your well. This way every pull of the lever delivers a set amount of water into your well. Thus eliminating1 the risk of flooding due to the well becoming pressurized.
1Beware dwarves that throw tantrums, they randomly pull levers.