  Let $F$ be an archimedean local field and let $E$ be $F\times F$ (resp. a
quadratic extension of $F$). We prove that an irreducible generic (resp. nearly
tempered) representation of $\operatorname{GL}_n(E)$ is
$\operatorname{GL}_n(F)$ distinguished if and only if its Rankin-Selberg (resp.
Asai) $L$-function has an exceptional pole of level zero at $0$. Further, we
deduce a necessary condition for the ramification of such representations using
the theory of weak test vectors developed by Humphries and Jo.
