# Sobolev spaces $H^1(R^n)$ and $H^1_0(R^n)$

I know that the Sobolev space $H^1_0(R^n)$ is the closure of $C^\infty_c(R^n)$ with repect to $H^1(R^n)$ norm. But then, I came across($H_m(\mathbb{R}^n)$ , the completion of $C_C^{\infty}(\mathbb{R}^n)$) that $H^1(R^n)$ is also the closure of $C^\infty_c(R^n)$ with respect to the $H^1$ norm.

So, this must mean that $H^1_0(R^n)= H^1(R^n)$, and does this result hold true for any unbounded domain $U$? I know that for bounded domain, the result is obviously not true, but I do not know whether the result is special for the whole domain $R^n$ or it is true for any unbounded domain

No, it is only true, if the boundary of $U$ is empty. Indeed, if $L \subset \partial U$ is a hypersurface (with non-zero $n-1$ Hausdorff measure), and if $U$ is reasonably nice in the neighborhood of $L$, then you have a trace operator $T : H^1(U) \to L^2(L)$. Moreover, $T \, u = 0$ for $u \in H_0^1(U)$, but $T \, u \ne 0$ for some $u \in H^1(U)$.
To consider an easier situation, you might try to understand the situation for a strip $U = (0,1) \times \mathbb R^{n-1}$.