Let $T$ be a complete first-order theory in a language $\mathcal{L}$, let $M \models T$, let $A \subset M$, and let $n \in \mathbb{N}$. Equip the set $S_n(A)$ of complete $n$-types over $A$ with the topology generated by the basic sets
\begin{align*}
[\varphi] := \{p \in S_n(A) : \varphi(x_1,\dots,x_n) \in p\},
\end{align*}
where $\varphi(x_1,\dots,x_n)$ ranges over all $\mathcal{L}(A)$-formulas with free variables among $x_1,\dots,x_n$. Then $S_n(A)$ is compact, Hausdorff, and totally disconnected. In fact, the sets $[\varphi]$ form a basis of clopen subsets.