Live vaccines have long been known to trigger far more vigorous immune responses than their killed counterparts. This has been attributed to the ability of live microorganisms to replicate and express specialized virulence factors that facilitate invasion and infection of their hosts. However, protective immunization can often be achieved with a single injection of live, but not dead, attenuated microorganisms stripped of their virulence factors. Pathogen-associated molecular patterns (PAMPs), which are detected by the immune system, are present in both live and killed vaccines, indicating that certain poorly characterized aspects of live microorganisms, not incorporated in dead vaccines, are particularly effective at inducing protective immunity. Here we show that the mammalian innate immune system can directly sense microbial viability through detection of a special class of viability-associated PAMPs (vita-PAMPs). We identify prokaryotic messenger RNA as a vita-PAMP present only in viable bacteria, the recognition of which elicits a unique innate response and a robust adaptive antibody response. Notably, the innate response evoked by viability and prokaryotic mRNA was thus far considered to be reserved for pathogenic bacteria, but we show that even non-pathogenic bacteria in sterile tissues can trigger similar responses, provided that they are alive. Thus, the immune system actively gauges the infectious risk by searching PAMPs for signatures of microbial life and thus infectivity. Detection of vita-PAMPs triggers a state of alert not warranted for dead bacteria. Vaccine formulations that incorporate vita-PAMPs could thus combine the superior protection of live vaccines with the safety of dead vaccines.