Most abdominal hernias can be surgically repaired, but surgery has complications. Time needed for recovery after treatment is reduced if hernias are operated on laparoscopically. However, open surgery can be done sometimes without general anesthesia. Robot-assisted hernia surgery has also recently gained popularity as safe alternatives to open surgery. Uncomplicated hernias are principally repaired by pushing back, or "reducing", the herniated tissue, and then mending the weakness in muscle tissue (an operation called herniorrhaphy). If complications have occurred, the surgeon will check the viability of the herniated organ and remove part of it if necessary. Muscle reinforcement techniques often involve synthetic materials (a mesh prosthesis). The mesh is placed either over the defect (anterior repair) or under the defect (posterior repair). At times staples are used to keep the mesh in place. These mesh repair methods are often called "tension free" repairs because, unlike some suture methods (e.g., Shouldice), muscle is not pulled together under tension. However, this widely used terminology is misleading, as there are many tension-free suture methods that do not use mesh (e.g., Desarda, Guarnieri, Lipton-Estrin, etc.). Evidence suggests that tension-free methods (with or without mesh) often have lower percentage of recurrences and the fastest recovery period compared to tension suture methods. However, among other possible complications, prosthetic mesh usage seems to have a higher incidence of chronic pain and can also cause infections.The frequency of surgical correction ranges from 10 per 100,000 (U.K.) to 28 per 100,000 (U.S.).
Occasionally, medical imaging is used to confirm the diagnosis or rule out other possible causes. The diagnosis of hiatus hernias is often by endoscopy.Groin hernias that do not cause symptoms in males do not need to be repaired. Repair, however, is generally recommended in women due to the higher rate of femoral hernias, which have more complications. If strangulation occurs, immediate surgery is required. Repair may be done by open surgery or laparoscopic surgery. Open surgery has the benefit of possibly being done under local anesthesia rather than general anesthesia. Laparoscopic surgery generally has less pain following the procedure. A hiatus hernia may be treated with lifestyle changes such as raising the head of the bed, weight loss and adjusting eating habits. The medications H2 blockers or proton pump inhibitors may help. If the symptoms do not improve with medications, a surgery known as laparoscopic Nissen fundoplication may be an option.About 27% of males and 3% of females develop a groin hernia at some point in their lives. Inguinal, femoral and abdominal hernias were present in 18.5 million people and resulted in 59,800 deaths in 2015. Groin hernias occur most often before the age of 1 and after the age of 50. It is not known how commonly hiatus hernias occur, with estimates in North America varying from 10% to 80%. The first known description of a hernia dates back to at least 1550 BC, in the Ebers Papyrus from Egypt.