In 1627 the English Fleet (as it was then) was divided into three squadrons, the Red, Blue and White, in that order or seniority, and each had an English ensign in the appropriate colour with St George’s Cross in the top corner. By 1653 the order of seniority had been changed to Red, White and Blue and in 1702 a large red cross was placed on the White Ensign to differentiate it from the French ensign, which at the time was plain white. In 1707, following the political union of England and Scotland, the three ensigns came to bear the Union Flag in the top corner as they do this day. In 1801 the additional red diagonal of St Patrick’s Cross was added to the Union Flag and the three ensigns then took their modern form.
Nelson was the Vice Admiral of the White Squadron, so Trafalgar was fought under the White Ensign in 1805 rather than the Red or Blue one. In 1864 the squadron system was abandoned and the entire Royal Navy adopted the White Ensign, meanwhile the Merchant Navy was allocated the Red Ensign, and the Blue Ensign was reserved for non-military government ships. During the years since then a large number of special ensigns have been created for many organisations (including yacht clubs and government departments) whose badges have been placed onto a blue or red ensign to create a new and distinctive flag.
The Red Ensign defaced by a badge is flown by Trinity House and various organisations and yacht clubs. Merchant ships and private vessels registered in British colonies and dependencies, and in several Commonwealth realms, fly the Red Ensign defaced by the badge of their territory.
The Red Ensign undefaced is for the use of all other British Merchant Navy ships and private craft. The Red Ensign is the correct flag to be worn as courtesy flag by foreign private vessels in United Kingdom waters.