As someone on here who actually suffered through a kidney stone, which was caused primarily by dehydration, I know this situation way too well.
One thing my urologist told me was, as Ray Willings noted, every morning you wake up, drink a large glass of water. Not just mornings you plan on going on a long ride, or hot days, every single morning. A good judge is that your urine should be almost clear whenever you go. Very light yellow. So get into this habit.
For my riding, if I know I'm going on a long ride, 30 miles or longer, an hour or so before my ride, I make sure to drink a good liter or so of water. If you're not good at the habit of sipping from water bottles, and don't want to stop to guzzle, then buy a Camelback, a good one. Make sure it fits, and I'd recommend a 3L if you're in a hot region, or planning on really long rides frequently. Half-century, metric century, etc.
Having said this, there is a condition called Hyponatremia you can get from drinking large quantities of water, and no electrolytes. But this usually involves things like drinking a gallon or so of water in a short period of time, like under a half hour. But people have done it, being overly concerned about dehydration. Just so you know.