To file for child custody or visitation (via dissolution or parentage action), you must file in the state where the child has lived with a parent or parent acting as a parent for at least 6 months immediately preceding the commencement of the action, or from birth of the child if less than 6 months. In California, you must also be a resident of the county for three months prior to filing your cause of action. For example, if a parent lives in Los Angeles County with the children and they have lived there for 6 months, they must file their cause of action in Los Angeles County California. They may not file in Riverside County or another state. In my practice, this does happen from time to time (parent filing in wrong county or state) which requires immediate action to return the children to California.
Is there a residency requirement for me to file for custody in a particular county or state?