If you own your home, it tracks that everything on your property belongs to you. But as you get closer and closer to your property lines, the space gets a bit more liminal: If there’s a fence separating your property from your neighbor’s, it’s a shared feature, even if only one of you technically owns it. After all, a fence defines both private properties, and you both benefit from it.

That’s why practicing proper fence etiquette is vital. A fence can literally form the edge where two lives rub up against each other, and it can be a source of friction if you’re not careful. And since fence ownership and rights can be vague and complicated, it’s in everyone’s best interests to follow a few simple rules to ensure that minor fencing disputes don’t grow into major problems.

Know the facts of who owns the fence

The rule of fence etiquette is to always know what you’re talking about. That starts with knowing your property lines: If the fence was already in place when you bought the house, you probably have no idea if it’s on your property, your neighbor’s, or on the line itself. If it’s entirely on your property, it’s your fence and vice versa. If it’s literally on the boundary line, it’s a boundary fence and your local area may have specific laws governing how that’s handled. If you’re not sure of your property lines, you might need to have a land survey done to establish them, which can cost anywhere from around $400 to $750. This can also be helpful to define your responsibilities concerning stuff that hangs over the fence, like tree branches that intrude into your property’s airspace.

Something else to consider when researching your property lines is the possibility of “adverse possession.” If the fence in question was built over the property line, giving your neighbor control over some portion of your property, for example, it’s possible that they could eventually claim that piece of your land—essentially moving the property line to match the location of the fence. It’s unlikely your neighbor is engaged in a slow, insidious plan to steal some of your land, and establishing adverse possession isn’t simple (your neighbor would have to control that piece of your property for a fairly long time to establish a claim, anywhere from seven to 20 years, depending on your location), but it’s something worth checking. If you find that the fence gives your neighbor control over a portion of your property (or vice versa), chances are it was an honest mistake, but it’s in your interest to address it.

Most local governments have specific requirements for the height, style, and other aspects of fences, and if you have a homeowner’s association (HOA), you should check if they have any rules regarding fencing as well. You want to know everything so you can avoid inadvertently breaking a law—or offending a neighbor.

Finally, if you’re building a new fence, you’ll need to know if your neighbors enjoy what are known as “prescriptive easements” on your property. An example of an easement is when a neighbor has to drive across a small section of your private property to access their own lot. If they’ve enjoyed that access for a long time, the law may recognize it as a right, and you could get into trouble if you suddenly fence that access off (not to mention making an enemy of your neighbor). Again, you’ll want to know about that before making any fence-related decisions.

Practice the rules of fence etiquette

Once you’re armed with the facts about your fence, property lines, and the local requirements, you’re ready to have all the fence conversations with your neighbor. Here are the general rules of fence etiquette that will avoid an all-out Neighbor War:

Respect property lines

Knowing where your property ends and your neighbors’ begins is one thing—respecting those lines is another. Don’t let your fence dribble over onto the lot next door just to avoid some rocky dirt or to shave a few dollars off the installation costs without discussing it with your neighbor and obtaining permission.

Communicate before changing things

Many local governments require you to alert your neighbors about a fence installation or replacement, but you should do so even if there’s no such law in your area.

Avoid unilateral decisions

Even if the fence is entirely on your property and thus your property, always discuss changes with your neighbors before doing anything to a fence. They don’t own it, but they will appreciate having the opportunity to make you aware of any unforeseen impact your plans might have on them.

Respect the neighborhood style

When building or replacing a fence, your HOA may have a lot to say about style and material. Your local government may have a lot to say about height and other requirements. But you should also take care to keep your fence in line with the look and feel of the neighborhood. Yes, it’s your property to do with as you will (within reason), but fences are weirdly shared aspects of your property. The courteous thing to do is to blend yours in with the rest.

Install with the good side out

Many fences have “finished” and “unfinished” sides. The unfinished side has the bracing and supports, the finished “good” side looks nice and clean. The good side should always face your neighbor. Alternatively, you can find fences that are finished on both sides (sometimes called “good neighbor” fences) to avoid the issue altogether. Although this means you won’t have control over what happens to the “nice” side of the fence, this is simple courtesy, and doing so can avoid bad blood.

Don’t insist on sharing the expense

The laws regarding maintenance and fence-related expenses vary widely around the country, and are often a bit vague and difficult to enforce. If you think your neighbor should pay for some portion of a fence repair or replacement, you should broach the subject, but keep in mind that you probably can’t force them to pony up. If they refuse, your best bet is to just walk away.

Compromise

If your neighbor is willing to share some of the fence expenses with you, they should get a vote on how the work is done. If you don’t agree on a style, material, or other aspect of the fence, try to find a compromise that works for you both.