Headaches on keto are usually a result of not having enough salt or electrolytes in your system. Electrolytes play an essential role in many important processes in the body, but your kidneys can mistakenly flush these out, along with salt, when your body is in ketosis.