Domains play an integral role in linguistic theories. This paper combines locality domains with current models of the computational complexity of phonology. The first result is that if a specific formalism – strictly piecewise grammars – is supplemented with a mechanism to enforce first-order definable domain restrictions, its power increases so much that it subsumes almost the full hierarchy of subregular languages. However, if domain restrictions are based on linguistically natural intervals, we instead obtain an empirically more adequate model. On the one hand, this model subsumes only those subregular classes that have been argued to be relevant for phonotactic generalisations. On the other hand, it excludes unnatural generalisations that involve counting or elaborate conditionals. It is also shown that strictly piecewise grammars with interval-based domains are theoretically learnable, unlike those with arbitrary, first-order domains.