I assume that you are talking about real numbers. Exponetiation for complex numbers are more... well, complex.
About the domain: although some powers with negative base, like $(-2)^3$, can be defined, the function $f(x)=a^x$ is defined for every real $x$ only if $a>0$. The reason is that powers with negative base and irrational exponent, like $(-2)^{\sqrt 2}$ can't be properly defined using only real numbers. Even with rational exponents there are problems, because the usual properties of exponentiation fail. Example:
$$(-2)^{2/6}=\sqrt[6]{(-2)^2}=\sqrt[6]{4}$$
But
$$(-2)^{2/6}=\left(\sqrt[6]{-2}\right)^2=??$$
Since the equation $a^x=x^a$ has two powers, and their respective bases are $a$ and $x$, both numbers must be positive.
About the equation:
The equation has at least an obvious solution, namely $x=a$. So the point is to see if there are more.
Let $a>0$. For every $x>0$ define
$$f(x)=\ln\frac{a^x}{x^a}=x\ln a-a\ln x$$
Note that the zeroes of $f$ are precisely the solutions of the equation $x^a=a^x$.
Then
$$f'(x)=\ln a-\frac ax$$
If $0<a<1$ then $\ln a<0$ and $f$ is strictly decreasing. So the equation has only one solution in this case.
If $a=1$ the only solution is obviously $x=1$.
If $a>1$, the derivative is zero only if $x=\frac a{\ln a}$, and the minimum of $f$ is at this point. And
$$f\left(\frac a{\ln a}\right)=a(1-\ln a+\ln\ln a)=a\ln\left(\frac{e\ln a}a\right)\stackrel *< a\ln\left(\frac ee\right)=0$$
Since $f$ is decreasing in $(0,a/\ln a]$ and increasing in $[a/\ln a,\infty)$, and $\lim_{x\to 0}f(x)=\lim_{x\to\infty} f(x)=\infty$, there are exactly two solutions in this case.
(*) To show this inequality, consider $g(x)=\frac{\ln x}x$ for $x>0$. Then
$$g'(x)=\frac{1-\ln x}{x^2}$$
so $g$ reaches a maximum at $x=e$. Then
$$g(a)\le g(e)=\frac 1e$$
Remark: If you see the equation $x^a=a^x$ as a Diophantine equation, you can choose the domain for $x$ and $a$ as $\Bbb Z$ instead of $(0,\infty)$, because powers with negative base and integer exponent are defined. This could give more solutions. I think that this is not what you are looking for, though.