We're regularly asked what various ensigns are and why they are flown. In fact the questions is usually, “What is that flag?”, rather than ensign.
The most senior position on a boat is the most aft and is reserved for the ensign. The ensign is, for most countries, the national flag but in the UK we reserve the national flag land and fly an ensign at sea. Failure of a UK registered vessel to fly an Ensign, is a breach of the Merchant Shipping Act.
In addition to the UK’s national maritime flag, the Red Ensign, there are white Ensigns, blue Ensigns and a number of red ensigns with a badge, Blue Ensigns with a badge and a light blue Ensign with a badge. These additional Ensigns are special or privileged Ensigns and may only be worn with permission, which is granted ultimately by the Her Majesty the Queen.
Blue ensigns may be flown by members of certain clubs with Royal Warrants and merchant ships with officers that are RN Retired or Royal Research ships. White ensigns are flown by naval ships of the line and may also be flown by yachts of the Royal Yacht Squadron when they are escorting the monarch.
Ensigns used to be sized at an inch per foot of yacht, but sometimes this is considered ‘under-dressed. A 3/4 yard ensign should look right on a boat of 21-26 ft, 1 yard for 27- 34 ft, 1 1/4 yard for 35 - 42 ft, 1 1/2 yard for 43 - 50 ft and 1 3/4 yard for 51 - 60 ft, but some discretion may need to be applied.
The next most senior position is the masthead, reserved for burgee, which must match the ensign that is flown. Next, the starboard flag halyard to the spreader, which is a signalling halyard for Q flags, courtesy flags, etc. The courtesy flag (for the nation in whose waters you are sailing) should fly higher than the other flags on board (except the masthead burgee).
The port flag halyard is reserved for house flags, such as club flags, etc.
In all cases, tatty or dirty flags are frowned upon and local authorities or residence may well take offence and even fine you if you fail to fly a courtesy flag.