Can the Alarm spell affect an unseen area behind a barrier

area-of-effectdnd-5espells

The Alarm spell in DnD 5e specifies:

Choose a door, a window, or an area within range that is no larger
than a 20-foot cube. Until the spell ends, an alarm alerts you
whenever a tiny or larger creature touches or enters the warded area.

It does not specify that the caster should be able to see the target area (unlike many AOE spells).

Does this mean that it works through walls and doors to cover any 20'x20'x20' area I choose in range, irrespective of the structures within that area?

Best Answer

A Clear Path to the target

To target something, you must have a clear path to it, so it can't be behind total cover. If you place an area of effect at a point that you can't see and an obstruction, such as a wall, is between you and that point, the point of origin comes into being on the near side of that obstruction.

Areas of Effect

Every area of effect has a point of origin, a location from which the spell's energy erupts.

...

A spell's effect expands in straight lines from the point of origin. If no unblocked straight line extends from the point of origin to a location within the area of effect, that location isn't included in the spell's area.

...

You select a cube's point of origin, which lies anywhere on a face of the cubic effect. The cube's size is expressed as the length of each side."

A diagram to illustrate enter image description here