Codex CXC 57-2004: what the milk hygiene code requires from farm to dairy plant

By AGS Compliance Team 7 min read

Codex CXC 57-2004, the Code of Hygienic Practice for Milk and Milk Products, sets the hygiene controls for milk from the farm through processing to the retailer. Adopted in 2004 and amended in 2007 and 2009, it asks for validated combinations of controls, with pasteurisation equivalent to 72 °C for 15 seconds or 63 °C for 30 minutes.

This guide is for dairy plant managers, QA and laboratory teams, and food inspectors who need to know what the code asks for and which dairy rules come from other authorities.

What is CXC 57-2004 and which version applies?

CXC 57-2004 is a Codex Alimentarius code of practice, published by the joint FAO/WHO food standards programme. Older documents call it CAC/RCP 57-2004. Codex has since moved its codes of practice to the CXC prefix, so both references point to the same text.

The main body follows the layout of the Codex General Principles of Food Hygiene, from primary production to training. Two annexes carry the detail.

Annex I covers the primary production of milk. Annex II covers the management of control measures during and after processing, with Appendix A on microbiostatic measures and Appendix B on microbiocidal measures such as pasteurisation. The text is on the FAO website.

The code is outcome-based. It does not prescribe one process per product. It expects you to choose control measures, validate that together they deliver a safe product, and prove that they keep working.

In the Gulf, GSO published adoptions of the code as GSO CAC/RCP 57:2008 and GSO 2214:2011. The GSO store now lists both as historical. Ask your regulator which Gulf or national dairy hygiene text it enforces.

In Abu Dhabi, milk production also falls under an ADAFSA code of practice, covered in our ADAFSA Code of Practice No. 30 guide.

Why does the code put so much weight on the farm?

Pasteurisation removes a proportion of the bacteria in milk, not a fixed number. The code designs pasteurisation to achieve at least a 5 log reduction of Coxiella burnetii, the most heat-resistant non-spore-forming pathogen likely to be present. A 5 log reduction cuts the count by a factor of 100,000. Raw milk that arrives 100 times more contaminated leaves 100 times more survivors after the same heat treatment.

That is why the code treats the chain as one continuum. Section 2.4 sets out the roles of milk producers, manufacturers, distributors, retailers, transporters, consumers and competent authorities. The manufacturer carries the main responsibility for the hazard analysis, but the producer must understand the hazards in milk too.

Annex I then sets farm-level expectations. Animals should be treated only with veterinary drugs authorised by the competent authority, and withdrawal periods must be respected. The code accepts that full HACCP is often not practical on a farm. Where it is not, good hygienic, agricultural and veterinary practices apply instead.

What does the code require of pasteurisation and other heat treatments?

Appendix B of Annex II sets a performance criterion and process criteria for pasteurisation. The performance criterion is the 5 log reduction of C. burnetii in whole milk with 4% milkfat. The minimum process conditions are equivalent to heating every particle of milk to 72 °C for 15 seconds in continuous flow, or 63 °C for 30 minutes in batch.

Products with high sugar content or high viscosity need more than these minimums. Flow in heat exchangers should be turbulent so that every particle is heated. Pasteurised products should show a negative alkaline phosphatase reaction immediately after heat treatment, which is the usual verification test. The code treats residual levels below 10 µg p-nitrophenol equivalent per ml as assurance of correct pasteurisation.

The appendix covers other treatments too. Thermisation is a milder heat treatment that the code expects to give a general reduction of about 3 to 4 log. Commercially sterile products, including UHT, must stay microbiologically stable at room temperature. The code allows this to be shown by incubation at 55 °C for 7 days or 30 °C for 15 days.

What does a dairy plant need to control after the kill step?

Everything after the pasteuriser is ready-to-eat product moving through a cold, wet plant. The code says that, depending on the hazard analysis and the controls applied, specific microbiological criteria for pathogens such as Listeria monocytogenes may need to be set. It also asks for stock rotation on a first in, first out basis and for vehicles to be cooled before refrigerated product is loaded.

The records below are AGS's reading of what an auditor or inspector will usually ask to see in a dairy plant working to the code. They are not quoted from it.

  • Raw milk acceptance records: temperature, residue screening and supplier status for each tanker.
  • The validation file for each heat treatment, including holding-tube checks and diversion valve tests.
  • Continuous time and temperature charts, signed and reviewed for every run.
  • Alkaline phosphatase results for each pasteurised batch.
  • CIP verification records: concentrations, temperatures and contact times.
  • An environmental Listeria sampling plan with zone maps, results and corrective actions.
  • Cold store and dispatch temperature logs.

A multi-product dairy also needs product-level controls. Fermented milks, cheese, cream and butter each have their own Codex commodity standard. For the HACCP side of the plan, read our guide to Codex HACCP.

Which raw-milk rules come from Codex, and which come from the EU or the US?

Dairy guidance online often mixes authorities. The best-known example is the 60-day ageing rule for cheese made from unpasteurised milk. That rule is American.

Under 21 CFR 133.113, cheddar made from unpasteurised dairy ingredients must be cured at not less than 35 °F for at least 60 days. Codex CXC 57-2004 contains no such ageing period. The table shows who sets what.

Topic Codex CXC 57-2004 EU Regulation (EC) No 853/2004 US 21 CFR
Cooling raw milk For raw-milk products: 6 °C or below within 2 hours of milking if collected daily, 4 °C or below if not Immediately to 8 °C or below if collected daily, 6 °C or below if not. No more than 10 °C on arrival Not compared in this guide
Raw milk counts No numeric limits. Manufacturers set incoming milk criteria for the end use (section 5.2.3.1) Raw cows' milk: plate count at 30 °C of 100,000 per ml or less, somatic cells 400,000 per ml or less Not compared in this guide
Herd health for raw-milk products Cows' milk from herds officially free of tuberculosis and brucellosis Health rules in Annex III, Section IX Not compared in this guide
Pasteurisation Equivalent to 72 °C for 15 s or 63 °C for 30 min, with a 5 log C. burnetii target Not compared in this guide 21 CFR 1240.61 table: 63 °C for 30 min, 72 °C for 15 s and higher-temperature options. Plus 3 °C if fat is 10% or more or sweetened
Cheese from unpasteurised milk No fixed ageing period Not compared in this guide Cheddar cured at not less than 35 °F for at least 60 days (21 CFR 133.113)

If you export, the importing country's rule applies on top of Codex. The EU figures above are in Annex III, Section IX of Regulation (EC) No 853/2004. Confirm the current consolidated text, and any US requirements, with your importer before you plan a process.

How AGS can help

Two AGS documents cover dairy hygiene. Each is a single editable Microsoft Word guideline, not a set of templates.

Other single-document guidelines are in our technical and hygiene guidelines collection.

Frequently asked questions

Is CAC/RCP 57-2004 a different document from CXC 57-2004?

No. It is the same Codex code under its older reference. The FAO-hosted text still carries the CAC/RCP number.

Does the code apply to cheese and yoghurt?

Yes. It covers the production, processing and handling of milk and milk products as defined in the Codex General Standard for the Use of Dairy Terms.

Is alkaline phosphatase the only way to verify pasteurisation?

It is the test the code names. The code also allows other methods that show the right heat treatment was applied.

Is the Codex milk code law in my country?

Only if your regulator adopts it or writes it into national rules. Check which dairy hygiene text your competent authority enforces.

AGS provides independent documentation toolkits. This guide and the referenced documents are not affiliated with, endorsed by or approved by the Codex Alimentarius Commission, FAO or WHO. The same applies to the GCC Standardization Organization, ADAFSA, the European Union and the US Food and Drug Administration. They do not guarantee any inspection or audit outcome.

Reviewed October 2026. Facts checked against the sources current at publication.