Sanitary districts were established in England and Wales in 1872 and in Ireland in 1878.  The districts were of two types, based on existing structures: 
Urban sanitary districts in towns with existing local government bodies
Rural sanitary districts in the remaining rural areas of poor law unions.

Each district was governed by a sanitary authority and was responsible for various public health matters such as providing clean drinking water, sewers, street cleaning, and clearing slum housing.

In England and Wales, both rural and urban sanitary districts were replaced in 1894 by the Local Government Act 1894 by the more general rural districts and urban districts.  A similar reform was carried out in Ireland in 1899 by the Local Government (Ireland) Act 1898.

England and Wales
Sanitary districts were formed under the terms of the Public Health Act 1872. Instead of creating new bodies, existing authorities were given additional responsibilities. The sanitary districts were created on 10 August 1872, when the act received royal assent, and the existing authorities were able to exercise their new powers from their first meeting after that date. The powers and responsibilities initially given to sanitary authorities in 1872 were relatively limited. They had to appoint a medical officer, but other powers were generally permissive rather than compulsory. Three years later the Public Health Act 1875 substantially broadened the scope of powers and expectations on sanitary authorities.

Urban sanitary districts were formed in any municipal borough governed under the Municipal Corporations Act 1835, in any improvement commissioners district formed by private act of parliament, and in any local government district formed under the Public Health Act 1848 or Local Government Act 1858.

The existing governing body of the town (municipal corporation, improvement commissioners or local board of health) was designated as the urban sanitary authority.

When sanitary districts were formed there were approximately 225 boroughs, 575 local government districts and 50 improvement commissioners districts designated as urban sanitary districts.  Over the next nineteen years the number changed: more urban sanitary districts were formed as towns adopted legislation forming local boards and as additional boroughs were incorporated; over the same period numerous urban sanitary districts were absorbed into expanding boroughs.

Rural sanitary districts were formed in all areas without a town government. They followed the boundaries of existing poor law unions, less the areas of urban sanitary districts.  Any subsequent change in the area of the union also changed the sanitary district.  At the time of abolition in 1894, there were 572 rural sanitary districts.

The rural sanitary authority consisted of the existing poor law guardians for the rural parishes involved.

The Local Government Act 1894 brought an end to sanitary districts in England and Wales. In boroughs, the corporation was already the sanitary authority. All other urban sanitary districts were renamed as urban districts, governed by an urban district council. Rural sanitary districts were replaced by rural districts, for the first time with a directly elected council. It was a requirement that whenever possible a rural district should be within a single administrative county, which led to many districts being split into smaller areas along county lines. A few rural districts with parishes in two or three different counties persisted until the 1930s.

The Local Government Act 1972 made district councils, London borough councils, the City of London Corporation, and Inner Temple and Middle Temple sanitary authorities.

Ireland
A system of sanitary districts was established in Ireland by the Public Health (Ireland) Act 1878, modelled on that in England and Wales.

Urban sanitary districts were established in the following categories of towns:
 Boroughs with municipal corporations (under the Municipal Corporations (Ireland) Act 1840)
 Towns having town commissioners under private acts of parliament
 Towns having town commissioners under public acts and having a population exceeding 6,000

The existing corporation or commissioners became the urban sanitary authority. The Local Government Board for Ireland, created by the same act, could designate other towns with commissioners as urban sanitary districts.

Rural sanitary districts were formed in the same way as those in England and Wales, from the poor law unions with the boards of guardians as the rural sanitary authorities.

The urban and rural sanitary districts were superseded in 1899, under the Local Government (Ireland) Act 1898, by urban and rural districts. Unlike rural sanitary districts, rural districts could not cross county boundaries: so for instance, Ballyshannon rural sanitary district was split into Ballyshannon No. 1, Ballyshannon No. 2 and Ballyshannon No. 3 rural districts in Counties Donegal, Fermanagh and Leitrim respectively. The Local Government Act 1925 abolished rural districts in the Irish Free State, creating a single rural sanitary district for the non-urban portion of each county, called the "county health district". The Local Government (Amendment) (No. 2) Act, 1934 allowed this district to be split on request of the county council; this happened only in County Cork, the largest county, which was split into three health districts.

Scotland
Sanitary districts were not formed in Scotland.  By the Public Health (Scotland) Act 1867 public health duties were given to the town councils, commissioners or trustees of burghs, and to parochial boards.  In 1890 the public health duties of parochial boards were allocated to the newly created county councils, administered by district committees.

See also
List of sanitary districts in Buckinghamshire
List of sanitary districts in Dorset
List of sanitary districts in Middlesex

Sources

Local Government Areas 1834 - 1945, V D Lipman, Oxford, 1949
Guide to the Local Administrative Units of England (2 vols.) F A Youngs, London, 1991
Public Health Act 1872 (35 & 36 Vict. c.79)
Public Health Act 1875 (38 & 39 Vict. c.55)
Public Health (Ireland) Act 1878 (41 & 42 Vict. c.52)
 Status details for Rural Sanitary District visionofbritain.org.uk

References

Sanitary districts of the United Kingdom
1870s establishments in the United Kingdom
1890s disestablishments
Defunct types of subdivision in the United Kingdom