The order is unspecified. It is, however, guaranteed to remain unchanged in the absence of modifications to the dictionary.
You can sort the keys when iterating:
for key in sorted(domains):
print key
Finally, it may be useful to note that newer versions of Python have collections.OrderedDict, which preserves the insertion order.