To complete the answer of Divierietti and the comment of Roy Smith, here is a statement which might interest you: **Theorem** If $X,Y$ are varieties over a field $k$, assume $X$ is smooth and $Y$ proper containing no rational curves. Then any rational map $X\dashrightarrow Y$ is everywhere defined. You can find that statement in Debarre's book Higher Dimensional Geometry, Corollary 1.44 p.31. In particular, if $X$ is smooth projective and contains no rational curves, then its automorphism group is equal to the group of its birational endomorphisms.