To understand how your habits can boost your immune functioning, know that there are two basic types of immunity in the body: innate and acquired. The innate immune system is your body’s first line of defense. “When an infectious agent, such as a bacteria or virus, attempts to invade your body, it immediately confronts the innate immune system, which has several components, each of which acts to restrict access to the body,” Dr. Schachter says. The first component involves physical barriers, like the skin and respiratory tract. While the skin is almost impenetrable, the respiratory tract is covered by mucus secretions, which trap infectious agents. But if the air you’re breathing is dry, the lack of moisture can dry out those secretions and help viruses and bacteria gain a foothold. The second line of defense consists of chemical factors like enzymes that help the body destroy invaders. Alongside those enzymes are specialized white blood cells called phagocytes—what Dr. Schachter calls “the workhorse of the defense system”—which devour unwanted bacteria and viruses. If these first-line defenses of the innate immune system fail, however, the acquired immune system activates, and it calls up several white blood cells to accomplish its mission. This is where lifestyle habits become critical. “Lifestyle choices play an important role in the function of these essential white blood cells, including macrophages, T and B lymphocytes, and natural killer (NK) cells,” he explains. So how can you improve your immunity to protect and encourage these natural defenses? Here are the seven lifelong habits to adopt for a killer immune system. Along with following good sleep hygiene habits, like keeping the room cool and dark and being consistent with your sleep and wake times, look to modify two factors that can negatively impact sleep: caffeine consumption and GERD, or reflux. First, limit caffeine consumption by switching to decaffeinated versions of tea and coffee (which still have some caffeine), and sipping no more than one cup of decaf coffee or two cups of decaf tea no later than 2 p.m. If you do have reflux, limit alcohol, spicy foods, sodas, and large meals, especially at night. (Here’s what else to eat and avoid if you struggle with acid reflux, heartburn, or indigestion.) RELATED: How to Make Immunity-Boosting Meals in 6 Simple Steps, According to an RD RELATED: Experts Say This Is How Much Wine You Should Be Drinking a Day for Optimal Health RELATED: 7 Mistakes That Could Make Your Cold Worse Than It Already Is