  A Rota-Baxter algebra $A_R$ is an algebra $A$ equipped with a distinguished
Rota-Baxter operator $R$ on it. Rota-Baxter algebras are closely related to
dendriform algebras introduced by Loday. In this paper, we first consider the
non-abelian extension theory of Rota-Baxter algebras and classify them by
introducing the non-abelian cohomology. Next, given a non-abelian extension $0
\rightarrow B_S \rightarrow E_U \rightarrow A_R \rightarrow 0$ of Rota-Baxter
algebras, we construct the Wells type exact sequences and find their role in
extending a Rota-Baxter automorphism $\beta \in \mathrm{Aut}(B_S)$ and lifting
a Rota-Baxter automorphism $\alpha \in \mathrm{Aut}(A_R)$ to an automorphism in
$\mathrm{Aut}(E_U)$. We end this paper by considering a similar study for
dendriform algebras.
