Ground rules are rules applying to the field, objects on and near it, and special situations relating to them, in the game of baseball. Major League Baseball has defined a set of "universal ground rules" that apply to all MLB ballparks; individual ballparks have the latitude to set ground rules above and beyond the universal ground rules, as long as they do not directly contradict each other. Additionally, a set of universal ground rules exists for the six MLB stadiums with retractable roofs, with the individual ballparks able to set additional rules.

Unlike the well-defined playing field of most other sports, the playing area of a baseball field extends to an outfield fence in fair territory and the stadium seating in foul territory. The unique design of each ballpark, including fences, dugouts, bullpens, railings, stadium domes, photographer's wells and TV camera booths, requires that rules be defined to handle situations in which these objects may interact or interfere with the ball in play or with the players, and adaptable by ballpark within the universal rules.

The term is familiar to most fans through the ground rule double, a batted ball that bounces fair, then over the outfield fence in fair or foul territory for a two-base hit.

MLB

Universal
Ball on the top step (lip) of the dugout is in play. 
No equipment is permitted to be left on the top step (lip) of the dugout. If a ball hits equipment left on the top step it is dead.
A player is not permitted to step or go into a dugout to make a catch. 
A player is permitted to reach into a dugout to make a catch. If a player makes a catch outside the dugout and the player's momentum carries him into the dugout, then the catch is allowed and the ball remains alive as long as the player does not fall while in the dugout.
A batted ball in flight can be caught between or under railings and around screens. 
A catch may be made on the field tarp. 
Batted or thrown ball lodging in the rotating signage behind home plate or along first base or third base stands is out of play. 
Batted or thrown ball resting on the rotating signage behind home plate or along first base or third base stands is in play.
The facings of railings surrounding the dugout and photographers areas are in play. 
Any cameras or microphones permanently attached on railings are treated as part of the railings and are in play.
Any recessed railings or poles that are in the dugout and photographers areas are out of play and should be marked with red to mark them out of play.
Robotic cameras attached to the facing of the backstop screen are considered part of the screen. 
A batted ball striking the backstop camera is considered a dead ball.
A thrown ball striking the backstop camera is considered in play.
A ball striking the guy wires that support the backstop is a dead ball.
A ball lodging behind or under canvas on field tarp is out of play. 
A ball striking the field tarp and rebounding onto the playing field is in play. 
No chairs can be brought out of the dugout or bullpen and onto the playing field. 
All yellow lines are in play.
A live ball striking the backstop screen or protective netting located on the field boundaries along the first and third base lines is in play. 
A ball striking protective netting located behind out-of-play areas such as dugouts and photographer areas is dead even if it rebounds onto the field. 
Where a roof is present, a batted ball that becomes lodged in the roof above fair territory is dead and the runners including batter-runner are awarded two bases. Ballpark-specific ground rules may supersede this rule. 
On outfield walls composed of sections with different heights (e.g., Fenway Park, Oracle Park), a batted ball in flight that strikes a taller section of the wall in fair territory at a point higher than the top of the adjacent shorter wall, then bounds out of play over the shorter wall, is a home run.
Conversely, a batted ball in flight that strikes the shorter wall in fair territory then bounds out of play over the adjacent taller wall is a dead ball and the runners including batter-runner are awarded two bases.

Individual ballpark
Individual ballpark ground rules vary greatly from ballpark to ballpark. For the 2017 season, Citi Field, Kauffman Stadium, Target Field, Yankee Stadium, and Guaranteed Rate Field are the only MLB ballparks that do not have individual ground rules above the universal set.

Examples of ground rules that have been or are still in major league ballparks include:
 Fenway Park (Boston Red Sox) – A fly ball that strikes the top of the ladder on the Green Monster and then bounces out of play is two (2) bases.
 Minute Maid Park (Houston Astros) – A batted ball striking the flagpole in center field and bouncing onto the field is in play; a ball striking the flagpole while in flight and leaving the playing field is a home run. The flagpole and the hill that it was on were removed following the 2016 season, and the rule has been removed from the specific ballpark rules list.
 Tropicana Field (Tampa Bay Rays) – A batted ball that hits either of the two lower catwalks (C Ring and D Ring) between the yellow foul poles is ruled a home run. The two upper catwalks (the A Ring and B Ring) are considered in play; a ball that touches either can drop for a hit or be caught for an out.
 Wrigley Field (Chicago Cubs) – A fair ball becoming lodged in the ivy on the outfield fence awards two bases to the batter and all runners; if the ball falls out of the ivy, it remains in-play.
 Citi Field (New York Mets) – Any fair ball in flight hitting the overhanging Pepsi-Cola sign is ruled an automatic home run. The sign has since been changed to "Coca-Cola" following new sponsorship in 2016, and no longer overhangs. The rule has since been removed from the specific ballpark rules.

Movement of retractable roofs
These ground rules only apply at ballparks featuring retractable roofs. As of the 2021 season, these are: Rogers Centre, Chase Field, T-Mobile Park, American Family Field, Minute Maid Park, and LoanDepot Park. Rules governing batted balls striking the roof are defined in each individual ballpark's ground rules.

Universal
The decision as to whether a game begins with the roof open or closed rests solely with the home club. 
If the game begins with the roof open: 
It shall be closed only in the event of impending rain or other adverse weather conditions. The decision to close the roof shall be made by the home club, after consultation with the Umpire Crew Chief. 
The Umpire Crew Chief shall notify the visiting club, which may challenge the closing of the roof if it feels that a competitive imbalance will arise. In such an event, the Umpire Crew Chief shall make a final decision based on the merits of the challenge.

Ballpark-specific
All ballpark-specific retractable roof ground rules concern opening of the roof after a game has started.

If the game starts with the roof closed:
 American Family Field, Chase Field, Minute Maid Park, & T-Mobile Park permit its opening during the game if weather conditions warrant, as long as the following procedure is followed:
The roof may be opened only once during the game. 
The Umpire Crew Chief will be notified at the beginning of the inning that the roof will be opened at the inning's end. 
The Umpire Crew Chief shall notify the visiting club, which may challenge the opening of the roof. In such an event, the Umpire Crew Chief shall make a final decision based on the merits of the challenge. 
The opening of the roof shall only begin between innings. 
Chase Field requires that the roof is opened in two sets of 2-minute-and-15-second intervals, at the conclusion of one inning and the conclusion of the following inning.
If the game starts with the roof open and it is closed during the game:
American Family Field permits re-opening during the game as long as the above procedure is followed.
At Chase Field, Minute Maid Park, T-Mobile Park and Rogers Centre, once the roof is closed during a game, it shall not be reopened.

References

External links
Major League Baseball Ground Rules
Major League Baseball Official Rules

Baseball rules