In short, yes. To file for divorce in California, there are California divorce residency requirements. First, either you or your spouse must have lived in California for the last six months, and second, you must have lived a minimum of three months in the county where you plan to file the divorce.
If you and your spouse have lived in California for at least six months but in different counties for at least three months, you can file in either county. If you don’t meet the residency requirement, you can still file for a California legal separation. If you choose to file for legal separation, you may file an “Amended Petition” and ask the court for a divorce, after enough time has passed so that you meet the California divorce residence requirements.