Studies on hydration status normally focus on water balance over a 24 hour period. For water balance to be maintained, water intake must equal water losses. So how much water or other fluids will be required for this?
It is difficult to make universal recommendations. People vary widely in their water needs depending on many different factors. These include age, gender, body size and composition, health, level of physical activity, and the temperature and humidity their environment. Even working in a dry air conditioned office can lead to increased water losses that we are not aware of.
"Conflicting points of view on how much fluid (including water) you should drink per day to stay well hydrated"
There are two conflicting points of view on how much fluid (including water) you should drink per day to stay well hydrated and government health agencies and other health authorities have changed their advice over the years.
One view is “to let thirst be your guide”. This is based on defining mild dehydration as starting at 3% loss of body weight.  It may work for who those sweat a lot, like athletes or those doing physical activity in hot climates. But it doesn’t seem to work so well for the average person going about their everyday activities, where water loss is smaller and more gradual.
Part of the problem is that humans do not sense thirst until they have lost 1% to 2% of their body mass as water.  By that stage, you are already mildly dehydrated. Water has been transferred from within and between the cells of your body and into your blood-stream. In addition, some people get used to ignoring thirst signals. In others, such as the elderly, the thirst mechanism is less effective.
However the brain is 80% water. Recent research has shown that a loss of just 1.6% of body mass impaired cognitive performance and mood in healthy young men.  It seems reasonable to assume that a similar minor water loss can trigger a headache attack.
The alternative view on maintaining hydration status is to offer specific guidelines for an “average” non-exercising person in a temperate climate.
It is commonly assumed that about 20% of our water intake comes from food.  That leaves about 1700 ml to be made up by water and other beverages. It fits reasonably well with what in the US is referred to as the 8 x 8 rule – in other words drink a total of eight 8 oz glasses per day, which comes to a bit less than 2 litres.
"About 20% of our water intake comes from food. That leaves about 1.7 litres to be made up by water and other beverages"
However what is generally not emphasised by the need to spread fluid intake out evenly throughout the day. It takes time for water to be absorbed from the gut, enter the blood-stream and rehydrate the cells.
Drink too much too quickly and a lot of it will pass straight through. It can also be dangerous under some circumstances, especially when a lot of salts have been lost in sweat and these are not replaced at the same time.
What about drinks containing caffeine, like coffee, tea and some soft drinks, which have a mild diuretic effect?
Water balance studies show that these don’t cause dehydration over a 24 hour period, at least for those used to caffeine. However it is possible that increased urination could lead to temporary water losses from within brain cells and trigger a headache attack. If these losses are later made good they won’t be detected.
In any case headache sufferers need to be cautious about their caffeine intake to avoid headaches triggered by caffeine withdrawal.
Water is certainly a much better choice than sugary commercial fruit juices or soft drinks which can cause your blood glucose levels to spike. These drinks, and even diet soft drinks,  have also been linked to progressively putting on body fat over time.
"We suggest you aim to drink roughly 1.5 litres of water evenly spread out over the whole day, and 20% derived from your diet, it will provide a total fluid intake of about 2 litres"
In the absence of any better evidence, we suggest you aim to drink roughly 1.5 litres of water evenly spread out over the whole day, giving a total fluid intake of about 2 litres.
Even if you don’t like water, this is an achievable target, provided you gradually replace some of your other beverages by water.
You could also try filtering tap water (this is a lot cheaper than bottled water) and adding a slice of lemon.
 H Valtin (2002). “Drink at least eight glasses of water a day.” Really? Is there scientific evidence for “8 x 8”?” Am J Physiol Regul Integr Comp Physiol, 283(5): R993 –R1004.
 LE Armstrong (2012). “Hydration Biomarkers During Daily Life: Recent Advances and Future Potential.” Nutrition Today, 47(4): Supplement 1: S3 - S6.
 MS Ganio, LE Armstrong, DJ Casa, BP McDermott, EC Lee, LM Yamamoto, S Marzano, RM Lopez, L Jimenez, L Le Bellego, E Chevillotte and HR Lieberman (2011). “Mild dehydration impairs cognitive performance and mood of men”. Br J Nutr, 106(10): 1535-1543.
 E Perrier, S Vergne, A Klein, M Poupin, P Rondeau, L Le Bellego, LE Armstrong, F Lang, J Stookey and I Tack (2013). “Hydration biomarkers in free-living adults with different levels of habitual fluid consumption”. Br J Nutr; 109(9): 1678–1687.
 VS Malik, A Pan, WC Willett and FB Hu (2013). “Sugar-sweetened beverages and weight gain in children and adults: a systematic review and meta-analysis”. Am J Clin Nutr; 98(4): 1084-1092.
 ML Power and J Schulkin (2013). The Evolution of Obesity, p117-118, JHU Press.