KiCad
KiCad Rule Areas (Keepouts): Block Copper, Vias, and Parts
How to draw a KiCad rule area to keep copper, tracks, vias, pads, or footprints out of a region, such as an antenna zone, and how DRC reports it.
Published Updated
Keepouts in KiCad are rule areas
KiCad does not have a separate “keepout layer” you draw on. Instead you draw a rule area: a polygon on one or more copper layers with a list of things it forbids. The same polygon tool is used for keepouts and for areas that custom rules refer to by name.
Typical reasons to draw one:
- the area under and around a Wi-Fi or Bluetooth module antenna, where the module maker asks for no copper and no components;
- a mounting-hole or screw-head region where copper must not be touched by a washer;
- a slot or cutout area near the board edge;
- a region where an enclosure feature or connector body needs clearance;
- a zone where you do not want vias, for example under a pad that will be soldered with a thick stencil.
How to draw one
- In the PCB editor choose Place, then Add Rule Area.
- Click to draw the polygon and double-click to finish.
- In the dialog, choose the layers it applies to (all copper layers for an antenna keepout, or just the layers you care about).
- Tick what is not allowed: tracks, vias, pads, copper pours, and footprints are separate options. A copper-only keepout leaves parts alone, and a footprint keepout blocks placement without touching existing zones.
- Optionally give the area a name, which lets custom rules refer to it.
Check the result by refilling zones and running DRC. A copper keepout should carve a hole out of ground pours on the layers you selected, and any track or via inside a forbidden region should produce a violation.
Refill after every change
Zone fills are cached. If you add or move a rule area and the pour does not change, refill all zones before you conclude the keepout did nothing. Many “keepout does not work” reports are a stale fill. It is also the reason to run DRC with refill enabled when you check a board for release.
Worked example: antenna keepout under a module
Modules with a PCB trace antenna publish a keepout in their hardware design guide: a rectangle at the antenna end of the module where no copper, no ground plane, and no components should exist on any layer, plus a requirement that the antenna overhang or sit at the board edge. The exact dimensions come from that module’s datasheet and are not the same across parts.
- Place the module so the antenna end sits at the board edge or overhangs it, as the datasheet shows.
- Draw a rule area over the datasheet’s keepout rectangle, extended slightly past the antenna on all sides.
- Select all copper layers and forbid tracks, vias, pads, and copper pours; add footprints if parts nearby could intrude.
- Refill zones and run DRC.
- Look at the plotted layers in a viewer to confirm no copper survived in that region (Gerber viewer check).
ESP32 carriers are the common case; the basics of laying them out are in ESP32-C3 carrier board basics.
Rule area versus courtyard versus edge cuts
These three are often mixed up:
- Rule area: your explicit instruction to the DRC about where something is forbidden.
- Courtyard: the outline around a footprint that keeps other footprints a minimum distance away. See courtyard and keepout terms.
- Edge.Cuts: the board outline. Copper clearance to it is governed by the edge clearance rule, not by a rule area.
Mistakes to avoid
- Drawing the area on one layer when the restriction applies to all of them.
- Forgetting that a keepout stops zones but you may still have a pad or track route running through it from before. DRC will tell you.
- Using a keepout to hide a real clearance error. If you need a different spacing, set it with a rule so the reason is visible.
- Copying keepout dimensions from another board. Use the datasheet for the exact part and revision you are using.