This is more about convention I guess, but suppose we have
$f(x)=\frac 1x$
$g(x)=\frac 1{x-1}$
Then domain of $g$ is clearly all real number except $1$. But what would be the domain of $f\circ g$?
If we say $f\circ g(x)= x-1$ , then it is defined for all real number, but if we consider
$$f\circ g(x)= \frac 1{\frac 1{x-1}}$$
Then it is not defined for $1$, we would be the convention in this case. Should we use the simplified version? Or is it not a big deal and I can choose either one of those definition?
A function $h : A \rightarrow B$ is a binary relation $\{ (x,y) \in A \times B \mid y = h(x) \}$.
Function composition is therefore simply relational composition for binary relations
$R_1 \circ R_2 = \{ (x,z) \mid \exists y. (x,y) \in R_1, (y,z) \in R_2 \}$
where $R_1$ and $R_2$ are functions.
The answer is therefore that $dom(f \circ g) = dom(f)$, since the "intermediate" $y$ mentioned in the definition of relational composition must exist for the composite function to be defined for a given argument.