I'm reading Aluffi's 'Algebra: Chapter 0' at present, and on page 154 it reads:
'There is an evident notion of "$R$-Algebra homomorphism" (preserving both the ring and module structure), and we get a category $R-Alg$.'
I've thought up two definitions that could fit with this, and I'm wondering which one is correct. If $A, B$ are $R$-Algebras, with canonical maps $f:R\to A, g:R\to B$ then:
An R-Algebra homomorphism is a map $h: A\to B$ such that for all $r \in R$ and for all $a, b\in A$ we have $rh(a+b) = h(ra)+h(rb)$, $h(ab) = h(a)h(b)$, and $h(1_A)=1_B$.
(Pretty sure this is equivalent) An R-Algebra homomorphism is a ring homomorphism $h: A \to B$ such that $h\circ f = g$.