The classic Poincaré inequality bounds the Lq-norm of a function f in a bounded domain Ω⊂Rn in terms of some Lp-norm of its gradient in Ω. We generalize this in two ways: In the first generalization we remove a set Γ from Ω and concentrate our attention on Λ=Ω∖Γ. This new domain might not even be connected and hence no Poincaré inequality can generally hold for it, or if it does hold it might have a very bad constant. This is so even if the volume of Γ is arbitrarily small. A Poincaré inequality does hold, however, if one makes the additional assumption that f has a finite Lp gradient norm on the whole of Ω, not just on Λ. The important point is that the Poincaré inequality thus obtained bounds the Lq-norm of f in terms of the Lp gradient norm on Λ (not Ω) plus an additional term that goes to zero as the volume of Γ goes to zero. This error term depends on Γ only through its volume. Apart from this additive error term, the constant in the inequality remains that of the ‘nice’ domain Ω. In the second generalization we are given a vector field A and replace ∇ by ∇+iA(x) (geometrically, a connection on a U(1) bundle). Unlike the A=0 case, the infimum of ∥(∇+iA)f∥p over all f with a given ∥f∥q is in general not zero. This permits an improvement of the inequality by the addition of a term whose sharp value we derive. We describe some open problems that arise from these generalizations.