Mediates the second step in the final reaction sequence of coenzyme Q (CoQ) biosynthesis (PubMed:20526342). Catalyzes the prenylation of para-hydroxybenzoate (PHB) with an all-trans polyprenyl group (such as all-trans-nonaprenyl diphosphate) (PubMed:20526342). The length of the polyprenyl side chain varies depending on the species, in humans, the side chain is comprised of 10 isoprenyls producing CoQ10 (also known as ubiquinone), whereas rodents predominantly generate CoQ9 (PubMed:20526342). However, this specificity is not complete, human tissues have low amounts of CoQ9 and rodent organs contain some CoQ10 (By similarity). Plays a central role in the biosynthesis of CoQ9 (By similarity). CoQ9 is a vital molecule that transports electrons from mitochondrial respiratory chain complexes (By similarity). CoQs also function as cofactors for uncoupling protein and plays a role as regulator of the extracellularly-induced ceramide-dependent apoptotic pathway (By similarity). Regulates mitochondrial permeability transition pore (mPTP) opening and ROS production (pivotal events in cell death) in a tissue specific manner (PubMed:22387164). 4-hydroxybenzoate + an all-trans-polyprenyl diphosphate = a 4-hydroxy-3-all-trans-polyprenylbenzoate + diphosphate 4-hydroxybenzoate + all-trans-decaprenyl diphosphate = 4-hydroxy-3-all-trans-decaprenylbenzoate + diphosphate 4-hydroxybenzoate + all-trans-nonaprenyl diphosphate = 4-hydroxy-3-all-trans-nonaprenylbenzoate + diphosphate Cofactor biosynthesis; ubiquinone biosynthesis. Belongs to the UbiA prenyltransferase family.