How to list filenames containing a specific string using ack-grep (ag)

Use ag -l to list only filenames that contain the given string.

For example, in order to list filenames containing the string 403 Forbidden, use

ag -l "403 Forbidden"