The policy operated by the London Borough of Newham for providing "last resort" emergency accommodation was judged to be "too rigid and too narrow".
The policy wrongly left the council free to provide accommodation anywhere outside its own district "regardless of the difficulties" it would cause for homeless families, said Mr Justice Dyson. In future, council housing officials had properly to consider the individual circumstances of each family.
In the same case the judge ruled that people facing eviction became homeless when possession orders took effect - not, as Newham claimed, on the day of actual eviction.
The eviction date ruling "will oblige all local authorities to provide interim accommodation much earlier", said David Matthias, appearing for the housing authority.
The decision was won by seven homeless families who had been put up in bed-and-breakfast accommodation in resorts such as Great Yarmouth, Brighton and Southend while their applications for more permanent housing were under consideration.
All seven had been brought back and offered temporary accommodation in London after launching their legal action. Newham now faces a legal- costs bill for all seven cases unofficially estimated at not less than pounds 20,000.
A spokesman for Newham said today's ruling had added to "the spiralling crisis of homelessness in the capital".