Envelope glycoprotein that forms spikes at the surface of virion envelope. Essential for the initial attachment to heparan sulfate moieties of the host cell surface proteoglycans. Involved in fusion of viral and cellular membranes leading to virus entry into the host cell. Following initial binding to its host receptors, membrane fusion is mediated by the fusion machinery composed at least of gB and the heterodimer gH/gL. May be involved in the fusion between the virion envelope and the outer nuclear membrane during virion egress. Homotrimer; disulfide-linked. Binds to heparan sulfate proteoglycans. Interacts with gH/gL heterodimer. During virion morphogenesis, this protein probably accumulates in the endosomes and trans-Golgi where secondary envelopment occurs. It is probably transported to the cell surface from where it is endocytosed and directed to the trans-Golgi network (TGN). Belongs to the herpesviridae glycoprotein B family.