One important point about the blocking approach is that it's only fun if
A. it's a well-defined element of the setting, or
B. it's the premise of the adventure.
In the first case, the blocker is just one of the tools in your toolbox, the same way guards, alarms, and locks are. The key considerations are that the blocker has known and accessible countermeasures, and that it's equally available to the PCs.
For example, in my Eberron game every secure facility is protected by a Private Sanctum. The spell has some simple countermeasures: you can't teleport into its area, but there's nothing preventing you from just walking across the barrier, or getting within 120 feet and casting Dispel Magic. The PCs take it into account when they infiltrate government installations, and have one of their own covering their own base.
In the second case, the idea is that the blocker is a weird and unique effect, and the meat of the adventure is interacting with it and learning how to get around it. This could mean turning it off, bypassing it entirely, or developing ways to endure it. The key considerations are that the blocker fits thematically with the rest of the adventure, and that it's something that the PCs can engage with and eventually overcome.
For example, a dungeon where teleportation is blocked needs to have a reason it's blocked; an artifact that projects an anti-planar-travel field when it's positioned over a planar rift, perhaps, or a system of ectoplasmic nets covering a corresponding area in the Astral plane. The PCs should be able to learn the nature of the blocker, figure out the rules that govern it, and eventually exploit a loophole or destroy a keystone to gain entry to the teleport-access-only room that contains their ultimate goal.
The one thing you don't do is just say "oh this place has weird magic, sorry but you can't teleport here."