A sebaceous gland, or oil gland, is a microscopic exocrine gland in the skin that opens into a hair follicle to secrete an oily or waxy matter, called sebum, which lubricates the hair and skin of mammals. In humans, sebaceous glands occur in the greatest number on the face and scalp, but also on all parts of the skin except the palms of the hands and soles of the feet. In the eyelids, meibomian glands, also called tarsal glands, are a type of sebaceous gland that secrete a special type of sebum into tears. Surrounding the female nipple, areolar glands are specialized sebaceous glands for lubricating the nipple. Fordyce spots are benign, visible, sebaceous glands found usually on the lips, gums and inner cheeks, and genitals.
 Sebaceous glands are found throughout all areas of the skin, except the palms of the hands and soles of the feet. There are two types of sebaceous glands, those connected to hair follicles and those that exist independently.
 Sebaceous glands are found in hair-covered areas, where they are connected to hair follicles. One or more glands may surround each hair follicle, and the glands themselves are surrounded by arrector pili muscles, forming a pilosebaceous unit. The glands have an acinar structure (like a many-lobed berry), in which multiple glands branch off a central duct. The glands deposit sebum on the hairs and bring it to the skin surface along the hair shaft. The structure, consisting of hair, hair follicle, arrector pili muscles, and sebaceous gland, is an epidermal invagination known as a pilosebaceous unit.
 Sebaceous glands are also found in hairless areas (glabrous skin) of the eyelids, nose, penis, labia minora, the inner mucosal membrane of the cheek, and nipples. Some sebaceous glands have unique names. Sebaceous glands on the lip and mucosa of the cheek, and on the genitalia, are known as Fordyce spots, and glands on the eyelids are known as meibomian glands. Sebaceous glands of the breast are also known as Montgomery's glands.
 Sebaceous glands are first visible from the 13th to the 16th week of fetal development, as bulgings off hair follicles. Sebaceous glands develop from the same tissue that gives rise to the epidermis of the skin. Overexpression of the signalling factors Wnt, Myc and SHH all increase the likelihood of sebaceous gland presence.
 The sebaceous glands of a human fetus secrete a substance called vernix caseosa, a waxy, translucent white substance coating the skin of newborns. After birth, activity of the glands decreases until there is almost no activity during ages 2–6 years, and then increases to a peak of activity during puberty, due to heightened levels of androgens.
 Relative to keratinocytes that make up the hair follicle, sebaceous glands are composed of huge cells with many large vesicles that contain the sebum. These cells express Na+ and Cl− ion channels, ENaC and CFTR (see Fig. 6 and Fig. 7 in reference).
 Sebaceous glands secrete the oily, waxy substance called sebum (Latin: fat, tallow) that is made of triglycerides,  wax esters, squalene, and metabolites of fat-producing cells. Sebum lubricates the skin and hair of mammals. Sebaceous secretions in conjunction with apocrine glands also play an important thermoregulatory role. In hot conditions, the secretions emulsify the sweat produced by the eccrine sweat glands and this produces a sheet of sweat that is not readily lost in drops of sweat. This is of importance in delaying dehydration. In colder conditions, the nature of sebum becomes more lipid, and in coating the hair and skin, rain is effectively repelled.
 Sebum is produced in a holocrine process, in which cells within the sebaceous gland rupture and disintegrate as they release the sebum and the cell remnants are secreted together with the sebum. The cells are constantly replaced by mitosis at the base of the duct.
 Sebum is secreted by the sebaceous gland in humans.  It is primarily composed of triglycerides (≈41%), wax esters (≈26%), squalene (≈12%), and free fatty acids (≈16%). The composition of sebum varies across species. Wax esters and squalene are unique to sebum and not produced as final products anywhere else in the body. Sapienic acid is a sebum fatty acid that is unique to humans, and is implicated in the development of acne. Sebum is odorless, but its breakdown by bacteria can produce strong odors.
 Sex hormones are known to affect the rate of sebum secretion; androgens such as testosterone have been shown to stimulate secretion, and estrogens have been shown to inhibit secretion. Dihydrotestosterone acts as the primary androgen in the prostate and in hair follicles.
 Sebaceous glands are part of the body's integumentary system and serve to protect the body against microorganisms. Sebaceous glands secrete acids that form the acid mantle. This is a thin, slightly acidic film on the surface of the skin that acts as a barrier to microbes that might penetrate the skin. The pH of the skin is between 4.5 and 6.2, an acidity that helps to neutralize the alkaline nature of contaminants. Sebaceous lipids help maintain the integrity of the skin barrier and supply vitamin E to the skin.
 During the last three months of fetal development, the sebaceous glands of the fetus produce vernix caseosa, a waxy white substance that coats the skin to protect it from amniotic fluid.
 The areolar glands are in the areola that surrounds the nipple in the female breast. These glands secrete an oily fluid that lubricates the nipple, and also secrete volatile compounds that are thought to serve as an olfactory stimulus for the newborn. During pregnancy and lactation these glands, also called Montgomery's glands, become enlarged.
 Meibomian glands, in the eyelids, secrete a form of sebum called meibum onto the eye, that slows the evaporation of tears. They also serve to create an airtight seal when the eyes are closed, and their lipid quality also prevents the eyelids from sticking together.  They attach directly to the follicles of the eyelashes, which are arranged vertically within the tarsal plates of the eyelids.
 Fordyce spots, or Fordyce granules, are ectopic sebaceous glands found on the genitals and oral mucosa. They show themselves as yellowish-white milia (milk spots).
 Earwax is partly composed of sebum produced by glands in the ear canal. These secretions are viscous and have a high lipid content, which provides good lubrication.
 Sebaceous glands are involved in skin problems such as acne and keratosis pilaris. In the skin pores, sebum and keratin can create a hyperkeratotic plug called a comedo.
 Acne is a common occurrence, particularly during puberty in teenagers, and is thought to relate to an increased production of sebum due to hormonal factors. The increased production of sebum can lead to a blockage of the sebaceous gland duct. This can cause a comedo (commonly called a blackhead or a whitehead), which can lead to infection, particularly by the bacteria Cutibacterium acnes. This can inflame the comedones, which then change into the characteristic acne lesions. Comedones generally occur on the areas with more sebaceous glands, particularly the face, shoulders, upper chest and back. Comedones may be "black" or "white" depending on whether the entire pilosebaceous unit, or just the sebaceous duct, is blocked. Sebaceous filaments—innocuous build-ups of sebum—are often mistaken for whiteheads.
 There are many treatments available for acne from reducing sugars in the diet, to medications that include antibiotics, benzoyl peroxide, retinoids, and hormonal treatments. Retinoids reduce the amount of sebum produced by the sebaceous glands. Should the usual treatments fail, the presence of the Demodex mite could be looked for as the possible cause.
 Other conditions that involve the sebaceous glands include:
 The word sebaceous, meaning 'consisting of sebum', was first termed in 1728 and comes from the Latin for 'tallow'. Sebaceous glands have been documented since at least 1746 by Jean Astruc, who defined them as "...the glands which separate the fat.": viii  He describes them in the oral cavity and on the head, eyelids, and ears, as "universally" acknowledged.: 22–25 viii  Astruc describes them being blocked by "small animals" that are "implanted" in the excretory ducts: 64  and attributes their presence in the oral cavity to apthous ulcers, noting that "these glands naturally [secrete] a viscous humour, which puts on various colours and consistencies... in its natural state is very mild, balsamic, and intended to wet and lubricate the mouth".: 85–86  In The Principles of Physiology 1834, Andrew Combe noted that the glands were not present in the palms of the hands or soles of the feet.
 The preputial glands of mice and rats are large modified sebaceous glands that produce pheromones used for territorial marking. These and the scent glands in the flanks of hamsters have a similar composition to human sebaceous glands, are androgen responsive, and have been used as a basis for study. Some species of bat, including the Mexican free-tailed, have a specialized sebaceous gland occurring on the throat called a "gular gland". This gland is present more frequently in males than females, and it is hypothesized that the secretions of the gland are used for scent-marking.
 Sebaceous adenitis is an autoimmune disease that affects sebaceous glands. It is mainly known to occur in dogs, particularly poodles and akitas, where it is thought to be generally autosomal recessively inherited. It has also been described in cats, and one report describes this condition in a rabbit. In these animals, it causes hair loss, though the nature and distribution of the hair loss differs greatly.