See
here for the canon laws on domicile:
Can. 100 A person is said to be: a resident (incola) in the place where the person has a domicile; a temporary resident (advena) in the place where the person has a quasi-domicile; a traveler (peregrinus) if the person is outside the place of a domicile or quasi-domicile which is still retained; a transient (vagus) if the person does not have a domicile or quasi- domicile anywhere.
Can. 102 §1. Domicile is acquired by that residence within the territory of a certain parish or at least of a diocese, which either is joined with the intention of remaining there permanently unless called away or has been protracted for five complete years.
§2. Quasi-domicile is acquired by residence within the territory of a certain parish or at least of a diocese, which either is joined with the intention of remaining there for at least three months unless called away or has in fact been protracted for three months.
Can. 104 Spouses are to have a common domicile or quasi-domicile; by reason of legitimate separation or some other just cause, both can have their own domicile or quasi-domicile.
Can. 106 Domicile and quasi-domicile are lost by departure from a place with the intention of not returning, without prejudice to the prescript of ⇒ can. 105.
And
here:
Art. 11 – § 1. In order to verify the canonical domicile of the parties and especially their quasi-domicile, as treated in cann. 102-107, in case of doubt a simple declaration of the parties does not suffice, but suitable documents are required, whether civil or ecclesiastical, or if these are lacking, other means of proof.
§ 2. If it is claimed that a quasi-domicile has been acquired by a stay in the territory of some parish or diocese, combined with the intention of remaining there for at least three months, particular care is to be taken to see whether the requirements of can. 102, § 2 have truly been fulfilled.
§ 3. A spouse separated for whatever reason either permanently or for an indefinite time does not follow the domicile of the other spouse (cf. can. 104).
Art. 12 – Once a cause is pending, a change of the domicile or quasi-domicile of the spouses does not remove or suspend the competence of the tribunal (cf. can. 1512, nn. 2, 5).