The U.S. flag is an important symbol of freedom and liberty for the American people. Fly your flag proudly if you wish, but be sure to follow the rules for doing so. These rules regulate all aspects of flag flying, from which direction it should face, to how it should fly when accompanied by other flags, to when it should be flown at half-staff.
Basics
If you do not have a standard flagpole, you'll have to find an alternative method of hanging your U.S. flag. If you hang the U.S. flag banner-style over a street, make sure the top of the flag faces north on a street running east to west, or east on a street running south to north. When hanging the flag from a horizontal or diagonal pole off the side of a building, make sure the flag is at the top of the pole. If you display the U.S. flag during a public speech, the flag should be to the speaker's right and in the foreground. If you hang a U.S. flag in your window, make sure the blue field of the flag is in the upper left corner (as seen from outside). Never let your flag touch the ground.
Other Flags
If you fly a U.S. flag with an international flag beside it, be sure the flags are on separate flagpoles and one flag is not above the other. When you fly the U.S. flag with a state flag, put them on the same flagpole with the U.S. flag flying at the peak and the state flag below. If you display the flag on a wall crossed with another flag, ensure the U.S. flag is on the viewer's left and crossing in front. When marching the U.S. flag in a parade with other flags, it should be in the front and center of a group of flags or on the right side if it's only marching with one other flag.
Half-Staff
Guidelines from the Department of Veterans Affairs state you should fly your U.S. flag at half-staff during times of national mourning and after the death of an elected official. For example, fly your flag at half-staff for 30 days after the death of a former or current U.S. president, or 10 days for a former or current vice president. In some instances flags will be flown at half-staff only in certain states or cities. For example, the death of a senator only requires flags on federal or military structures in Washington, D.C., to fly flags at half-staff, and governors' deaths only impact the state they governed. Additionally, the U.S. president can order flags at half-staff to mark the death of an important figure or a national tragedy such as a terrorist attack.