This matter came before the court on a petition and rule to show cause filed on behalf of a wife against her husband to obtain custody of their three minor children, all under the age of 10 years. The rule was signed on May 12, 1972. On May 24,1972, the return day of the rule, a hearing was held before this court. At that time, counsel for the husband appeared, specially attacking the jurisdiction of the court and alleging improper service. By agreement of all concerned, the hearing was restricted to these issues.
At the hearing, the only testimony which was presented came from the wife. She stated that on April 29, 1972, her husband, against her will and without her knowledge, took the three minor children and left the State. From that time until May 14, 1972, she had no knowledge as to their whereabouts.
On May 14,1972, the wife flew to Florida, at the suggestion of her husband’s attorney, whereupon she was reunited with the children in Tampa. On May 15,1972, the wife took the three children back from Florida with her to reside in Delaware County. On May 23,1972, the husband took the two older children out of school, here in Delaware County, and as of the date of the hearing his and the children’s whereabouts were unknown. Although the wife’s testimony concerning this fact was subject to attack as being based on hearsay, neither party denies the fact that the two older children are residing with their father.
At the outset, it should be noted that the youngest child of the parties was at the time of the hearing before this court residing with his mother. Therefore as far as he is concerned, the matter is moot. Habeas corpus is not the appropriate remedy to obtain custody *700of a child who is already residing with you. If a party in such a situation deems it necessary to obtain a court order giving her “legal” custody of a child, there are appropriate legal methods for accomplishing this. See In re custody of Minor Children of Dunbar A. Rosenthal, 103 Pa. Superior Ct. 27 (1931).
There is no doubt but that on May 12, 1972, when these proceedings were brought, neither the husband nor the minor children involved were in the Commonwealth of Pennsylvania. Although the custody petition would seem to indicate that said individuals were within the jurisdiction of the court at the time of the filing of that petition, the wife admitted in a companion petition seeking relief that she did not know where her husband and children were and was seeking to ascertain their whereabouts from husband’s attorney. This companion petition was subsequently abandoned. Finally, at time of the hearing the wife admitted that her husband left the State with the children on April 29, 1972, and was out of the State with the children at the time these proceedings were brought.
The relevance of the above is that without the physical presence of either the children or the husband in the State, this court cannot obtain jurisdiction. The rule is that jurisdiction either follows the domicile of the child or the residence of the child. The legal residence of a child is the same as that of his father. Where the parents, however, are separated and have established different domiciles, the child usually takes the domicile of the parent with whom he, in fact, lives: Commonwealth ex. rel. Burke v. Burke, 168 Pa. Superior Ct. 578, 80 A. 2d 87 (1951).
Presence of either the spouse who has control over the children in the Commonwealth or the children themselves is essential to the court in obtaining the requisite jurisdiction. Thus, in the case of Swigart v. *701Swigart, 193 Pa. Superior Ct. 174, 163 A. 2d 716 (1960), the court, while affirming the above rule, found that they did have jurisdiction since the husband was domiciled and had his permanent residence here in Pennsylvania. Further, he was personally served here in Pennsylvania. At the time the proceedings were brought, the children were residing in Brazil with him and apparently he at time of service had returned to Pennsylvania for a short visit. The court in that case felt that although the physical residence of the children was in another State, this was no bar to their exercising of jurisdiction where they had jurisdiction over the one who had the power to produce the children, namely, the father.
In the case before this court, not only were the husband and the children residing out of State at the time these proceedings were brought but, further, from the background presented at trial, it cannot be said that the husband was domiciled or permanently resided in Pennsylvania prior to leaving for Florida. Following the marriage of the parties in 1961 in St. Louis, Mo., they have resided in at least four different States. In October of 1970, they moved to Springfield, Delaware County, Pa., where apparently the husband resided up until the time he left for Florida. The wife testified that in March of 1972 she left the Springfield Road address and took the children with her and moved to Media, Pa., where she presently resides. The children, however, continued to attend school in the Springfield school system. The matter is further clouded by the fact that even while the parties resided, supposedly as a family, in Springfield from October of 1970 to March of 1972, the wife maintained an apartment in Crum Lynne, Delaware County, Pa., where she stayed from time to time.
Having determined that this court did not have *702jurisdiction at the time these proceedings were commenced, we must next determine whether or not we somehow obtained jurisdiction due to the fact that from May 15, 1972, to May 23, 1972, a period after the custody petition was filed, the children resided here in Pennsylvania. No authority has been presented in support of this proposition, and we are of the opinion that this does not alter the situation. Both at the time these proceedings were brought and at the time testimony was taken before the court, the evidence clearly indicated that neither the husband nor the children were present in the Commonwealth of Pennsylvania. We, therefore, determine that we have no jurisdiction to hear this case.
At the time of the hearing before this court on May 24, 1972, the attorney for the wife handed up an affidavit of service which is contained in the record papers. The affidavit indicates that the petition and rule were served personally on the husband on May 14, 1972, in Tampa, Fla. The affidavit was taken by one Thomas Anthony who was not further identified. In this regard, the court was initially of the opinion that the service was improper. Although the order of the court signed May 12,1972, indicated that service should be made on the husband either personally or by certified mail, implicit in said order was the fact that service, to be effective, was to be made in Pennsylvania. See Act of May 25, 1951, P. L. 415, sec. 4, 12 PS §1904. Despite the fact that the court felt that service was improper, it went on to consider the jurisdictional question because, in the event that it found jurisdiction to exist, the wife would have an opportunity to cure the defective service, if possible.
Although the court has dismissed this action, it did so reluctantly. The best interest of children are never served as a result of the activities which exist*703ed in this case. The children need a stable environment and if the parties persist in the conduct which has existed to date, the children will be the losers in the long run. As indicated, however, the lack of any sufficient authority for assuming jurisdiction prevented this court from hearing the matter on the merits and we, therefore, entered an appropriate order on May 26,1972, dismissing the proceedings.