A (possibly T1) topological space has a dense subset which is homeomorphic to the whole space. What can be said about the space? Let $X$ be a (possibly T1, that is, singleton subsets are closed) topological space. Suppose that there is a proper subset $D \subset X$ such that:


*

*$D$ is dense in $X$;

*$D$ is homeomorphic to $X$.


What can be said about $X$?
 A: The question is awfully broad; it’s not clear that much of interest can be said. For what they’re worth, here are a few simple observations and examples.
The most obvious consequence is that $X$ must be infinite. We can also see right away that if $X$ is Hausdorff, then it cannot be compact: a proper subset homeomorphic to $X$ would be compact, and since $X$ is Hausdorff it would be closed and therefore not dense in $X$. On the other hand, any infinite space with the cofinite topology is a compact $T_1$ example.
The first Hausdorff example that comes to mind is $\Bbb Q$. A less obvious example is $X=C\setminus\{1\}$, where $C$ is the middle-thirds Cantor set. $X$ is well-known to be homeomorphic to $\Bbb N\times C$, where $\Bbb N$ has the discrete topology, which has the proper dense subset $\Bbb N\times X$. This in turn is homeomorphic to $\Bbb N\times(\Bbb N\times C)$ and hence to $\Bbb N\times C$ and thus to $X$.
All three of these examples are homogeneous, in the sense that if $x$ and $y$ are any points of the space, there is an autohomeomorphism of the space taking $x$ to $y$. However, there are non-homogeneous examples as well, since an arbitrary discrete union (topological sum) or Cartesian product of examples is also an example. Indeed, in both constructions it suffices that one of the summands or factors have the property; this immediately leads to a great variety of examples.
A: To avoid too many comments, I'll convert them into an answer.
First of all, there are many examples of such spaces:


*

*The positive rationals $\mathbb Q^+$ are an example. Let $f:\mathbb Q^+\to\mathbb Q^+$ be defined by $f(q)=q^2$. This is a homeomorphism from $\mathbb Q^+$ to $f(\mathbb Q^+)$ and $f(\mathbb Q^+)$ is dense in $\mathbb Q^+$ but $2\notin f(\mathbb Q^+)$.

*For $n\geq 2$, $\mathbb R^n$ is homeomorphic to its dense subset $\mathbb R^n\setminus\{0\}^{n−1}\times[0,\infty)$.

*Infinite-dimensional Banach spaces also seem like good candidates.


Such spaces are not necessarily Hausdorff. Take any infinite set $X$ and equip it with the trivial topology $\{\emptyset,X\}$. Then any injective map $f:X\to X$ onto a proper subset of $X$ is a homeomorphism onto a dense subset of $X$.
A compact Hausdorff space satisfying your conditions does not exist: $D$ would have to be closed in $X$ and therefore not dense.
This still leaves some room for compact $T_1$ spaces possibly satisfying your conditions. Indeed, $\mathbb Z$ equipped with the cofinite topology is such a space. It is compact and $T_1$ and homeomorphic to $2\mathbb Z$, which is dense in $\mathbb Z$, since it is infinite.
If I come up with more ideas, I'll post them here.
