This question is so common and often followed by a confusing answer. So here it is all spelled out.
Little other that the type of ensign flown is generally subject to law. The rest is based on maritime tradition that varies a little from country to country. Guidelines have been issued by many sailing associations, private clubs, etc.
This is the owners national maritime flag.
This is the maritime flag indicating a vessel's nationality (country of registration).
The Ensign takes pride of place at the stern, the position of greatest honour on a ship. It should be flown as close to the stern as possible on a flagstaff, or 2/3 up the leech of the aft sail, or at the peak if gaff rigged, or from the mizzen mast head for ketches and yawls.
Traditionally it is not flown all the time. It is hoisted when someone is on board. It should be hoisted at sunrise or
0800 (or 0900 in the winter) and lowered at 2100 or sunset. Customs vary between countries.
It should be lowered when racing
. It is not worn after the 5 min gun, unless retired from the race. It can be hoisted after crossing the finish line.
The size considered aesthetically pleasing is generally 1" per foot of vessel.
One act that is not done much anymore, is to dip your Ensign to a Royal Yacht or Warship. Once you have dipped, you wait for a dip from the other ship and wait till they rehoist. Then you may rehoist your own Ensign. Don't be disapointed if a Warship does not do this for you, they tend to be rather busy these days watching out for us little fellows below than whether you have dipped your ensign or not.
Certain yacht clubs may be granted a warrant to use a special ensign, which may be a defaced ensign or a different colour that may be plain or defaced. It must be worn in conjunction with the relevant burgee and must only be worn when the warrant holder is on board or "nearby", other wise the conventional national maritime ensign must be worn.
A defaced ensign may have special conditions attached to its use eg it may sometimes only be used in home waters.
This flag takes second pride of place.
You may fly it on your own yacht or one you are chartering or borrowing.
You do not fly your club burgee when racing
The normal place to fly a burgee is from a flag stick at the main mast head
. Not such an easy place to reach on a sailboat, so the lower spreader on the starboard side is an alternative. Transfer to the port side if a courtesy flag or signal flags are flown.
No flag should be worn above the burgee on the same halyard.
This is also a flag that is flown only when the member
is onboard or in the close vicinity.
The flag travels with the member, not the yacht.
Out of courtesy, any vessel visiting a foreign port should fly that country's maritime ensign or national flag depending on the country (for the UK it is the Red Duster, for Australia it is either the Australian National Flag or the Australian Red Ensign).
It must never be flown "inferior" to flag other than yacht's ensign or a club burgee if it is on the mast halyard. It is generally flown on the starboard halyard or if tied to a dock then in some countries (eg Denmark) the dockside spreader should be used. When in use on the starboard spreader, transfer anything other than signal flags or regional flags to the port spreader.
Generally there is no law governing the display of this, but it is usually considered insulting not to fly the flag of the host country in their territorial waters.
If not flown it may upset officials and you may be refused entry (it has been threatened in Gibraltar).
If it is in poor condition you may be fined (it has occurred in the US).
House flags: (the owner's or charterer's flags eg clubs, associations, private flags, including CF flag)
Customs vary between countries as to whether these are flown on the port or starboard spreader, although if starboard is in use port is always selected. In some countries the masthead is acceptable.
The flag travels with the member, not the yacht.
Charterer/guest flag: (Honour flag)
Either a maritime or national flag representing a charterer's/guest's/skipper's nationality can be flown from the port spreader, or in some countries the starboard spreader if it is not in use. This is a new custom and is an area that protocol varies significantly between countries as to what should be flown and where.
If several countries need to be represented, fly them on separate halyards alphabetically from port to starboard.
- The USPS (US) suggest the ensign of the guest's country may be flown from the port spreader. No mention is made of charterers.
- The RYA (UK) state the custom has sprung up of a charterer indicating his own nationality by wearing an ensign at the port crosstrees. No mention is made of guests.
- In Poland the national flags of charterer/guests/crew are shown under the port spreader.
- Danish National Flag Etiquette (published by the Danish National Sailing Association and the Danish Royal Yacht Club) states the guest's national flag may be flown under the starboard spreader, retiring to port if the starboard is needed for something else (although it is considered incorrect to fly any ensign on the starboard spreader other than that of the host country).
Regional Flag (eg Scottish flag)
Flown on the starboard flag halyard below the courtesy flag if used.
These should not be flown at sea if they may be mistaken for signal flags.
This is a yellow flag that is flown upon entry to a foreign port. Failure to do so can cause all sorts of issues. Flying a yellow flag means you are declaring that your vessel and persons on board are healthy and that you require free Pratique and Customs
It is generally flown on starboard spreader halyard below the courtesy flag.
Other signal flags:
These are generally flown on starboard spreader halyard below the courtesy flag if used.
A few useful ones to know are:
Vertically White and Blue flag (Divers Flag)
..."A" Alpha Flag. This is flown when you have someone in the water diving
and warns other vessels to keep well clear.
All Red flag
..."B" Bravo flag, means danger
. Normally seen on tankers etc. Any vessel that is carrying cargo that is deemed dangerous.
Multiple Yellow and Blue vertical stripes
..."G flag", means that the large vessel is requiring a pilot. It could be worth being cautious.
Vertically White and Red
..."H flag", means the pilot is on board and the vessel is under his/her command. It is still worth excersising care as there may be a fast moving pilot vessel running around after dropping off or picking up his pilot.
Blue around the outside of a White Flag
..."P" Papa flag, means the vessel is about to proceed to sea.
Edited to add: A recent thread on flag etiquette has revealed a lot of useful information. I have edited changes to this post in blue.