Nautical Flag Etiquette
How to fly the colours.
Ensign
Ensign is the fancy nautical name for a national flag identifying the country of registration of a ship. Some of them are the same as the country flag, but a few countries have a different design for use on ships. Some even have a different one for merchant ships, for pleasure crafts, for government ships, and for military ships.
Merchant ships generally fly their ensign when in port, and when sailing in and out of port, or when passing through coastal waters within viewing distance of the coast. At sea, the ensign is usually stored away unless a ship is sailing through a designated war zone where being identifiable is in their best interest. When ships are signalling each other or being part of a bigger group or an operation, flags are up too. Where this flag is flown depends on the design of the ship, and the ship's status.


Location at sea / underway
Motor vessel
Ships fly their ensign from the top of the mainmast, in the centre. Usually, this is the aft mast.
Sailing vessel
Well, things get complicated here. The traditional spot is from the mizzen gaff. But not all sailing ships have a gaff anymore. Then it can be hoisted from the top of the aft-most mast.
Location in port / at anchor
Motor vessel
When moored ships fly their ensign from a flagpole on the stern.
Sailing vessel
In this case, in a similar position as the motor vessels.
Curtesy flag
The curtesy flag is a (maritime) flag of the country the ship is visiting, usually a smaller size than their own national ensign. Equal in size, as the ship has signal flags.
Curtesy flags are flown from just before the pilot is taken onboard till after the pilot goes off. National rules dictated the hours this flag is flown, all the time, sunrise to sunset, or take anything else.
Location
Curtesy flags are flown from the starboard yardarm of the mainmast.
In modern merchant ships, this is usually the aft mast on top of the accommodation.
On sail boats, this is usually (but not always) the biggest mast.
Curtesy flags are only flown in combination with the ensign.
confusion
Some landlubbers are confused by this, as they apply land rules that denote honour to the flag flown the highest. While on a ship, the point of most honour is the stern. Right where the ship is commanded from.
Signal flags
These flags are hoisted on the portside of the mainmast, on a flag line connected to the spreader or a yardarm. These flags are part of the International Code of Signals and consist of the letters of the alphabet, numbers and some others to repeat letters or two separate codes. The No.1 pennant (seen to the right) is an example of such a flag.
These flags are used on this location, for single flag signs, like the Hotel flag for signalling you have a pilot on board, or as the hoisting location for full messages back and forth. For the latter, it is convenient to have two flag lines, so you can use the Answering pennant on one and your codes on the other.
House hold flags and club burgees

Household flags are flags representing companies or clubs.
House hold flags are flown from either yard arm, but mostly the port, or even both, of the secondary mast. This can be either the forward or the after mast. If there's no secondary mast, then it can be hoisted on the port side yardarm of the mainmast. Or the top of the mast if there's no other flag taken that spot.
Jack
Jacks are smaller flags, rectangular in shape, and are a part of showing the identity of a ship. Jacks are flown from a small flagpole on the tip of the bow of the ship. This flagpole can be placed on the tip of the bowsprit or even the jibboom too. Sometimes the Jack is flown, hanging from the tip of the bowsprit.
Different nations have different practices. In the Netherlands, all ships and vessels can fly the Enkele Prinsengeus and only the navy can fly the Dubbele Prinsengeus. But more accurate is; to fly small flags representing the province, region or city the ship is coming from to be flown here.
Jacks are only flown when the ship is stopped, either moored in port or at Anchor. Not underway. Jacks are only flown in combination with the ensign. They can be flown every port visit, but a lot of ships reserve this practice for special events.

Greeting
Ships underway can greet each other with their flags. This is done by lowering the flag with the halyard, till the bottom is almost at its lowest point, but the flag still kept flying. Then the ship that is being greeted does the same and hoists it again. Then the first ship hoists the flag to the top again.
Who greets first the difficult part of this system.
Not answer a greeting is considered very offensive. And has led to nations going to war.
Rowing boats can greet by raising all their oars vertically and having the blade of the oar parallel to the length of the ship. Small sailing boats can greet by dropping their jib or fore staysail.
Insults
It is not an insult to not have a curtesy flag when coming into a port unexpectedly. If a ship comes into port for an emergency, and there is no cutesy flag of that nation on board, no flag shall be flown. Generally, the harbour master is then informed about the absence of a flag, and they will supply the ship with one as soon as it is docked. For a substantially inflated price, of course.
Other times, a place may a dependence of another nation. Flying the Danish courtesy flag when visiting Greenland might technically be correct. But it's not really appreciated.
Racing
When ships and boats are racing, they do not fly an ensign, or courtesy flag. Neither a house nor club flag / burgee, or any other signal flag. While sailing to the start area, all flags are taken down. The ensign is the first to go up again after finishing. Or it can be used as a signal that, that vessel has retired from the race.
During racing a protest flag can be used to signal the judges that another vessel has breached the rules and you want them to investigate.
Some races may use special flags, often numerals from the signal flags to organise participants in different classes, while they are racing at the same time.
Dressing overall
When ships have something to celebrate, they can dress up. There are two versions of doing this. The first one actually less known. This is when you fly a jack, ensign on every mast top, from the gaff or stern flag pole. With the addition of household or club flags on all yards that are not used for courtesy, signal or personal flags.
The big party version of dressing overall, is when you add to the above, by stringing all your signal flags together in and hang them from the bow to stern, going over all the masts tops. Different nations have different orders for the signal flags, but the rule of thumb is that they don't spell out anything.
Alternatifly if your vessel is not designed to have lines of flags from masthead to masthead, you can line the flags up from railings to mast head on all the masts, so that they go up almost vertically along the mast. Usually on the shore side of the vessel if moored.
Jolly Roger
Flying a pirate ensign in itself is not a crime. You can use it as a house or club flag even. But when you use a pirate flag as an ensign, and commit pirate actions. Then it becomes part of the evidence to have the law go after the supposed pirates.
Ettiquette?
Pirate flags come with their own customs you can read more about that in this article:
False flag
Flying an ensign that is not your own is frowned upon but it is sometimes allowed! Read all about that here:
Misconception
An idea from the movies is that flying your ensign upside down is a signal for distress. This is not true today, and it never was. There are many many flags out there which do not look different at all upside down. And there are some flags who even would represent another nation when turned around.
Personal flags
Personal flags are flags that are only flown by one person. These could, for instance, be heraldic banners from nobles and royalty. Or banners connecting to a certain job or rank. The latter are known as flag-officers.
For example a Commodore can have a personal flag to show off that he's commanding that ship from the company he works for.
Group flags
When sailing as a group, either in a flotilla or convoy ship's can fly a special flag, often a pennant, to signal that they belong to the group. Sometimes the leader of the group has a special version of that flag.
Striking the flag
If a ship lowers their ensign while in battle, this is a sign of surrender. Even today, this is still the way. It has happened that a ship had its ensign blown away; the battle was paused, the other ship send a rowboat over to ask if they surrendered? This was denied, the rowboat went back, and the battle continued.
If you take a flag down regularly, it is not called striking, it's just lowering.
Very interesting! "Fals flag" I guess there's an e missing on the sidebar headline.
Thank you Tillerz, will fix it right away!