  A generalization to the Gibbons-Hawking-York boundary term for metric $f(R)$
gravity theories is introduced. A redefinition of the Gibbons-Hawking-York term
is proposed. The proposed new definition is used to derive a consistent set of
field equations and is extended to metric $f(R)$ gravity theories. The surface
terms in the action are gathered into a total variation of some quantity. A
total divergence term is added to the action to cancel these terms. Finally,
the new definition is proven to demand no restrictions on the value of ${\delta
g}_{ab}$ or ${\partial}_{c}{\delta g}_{ab}$ on the boundary.
