Can a web site detect and deny an attempt to use it in an iframe?

I built a web page for myself that uses iframes to show the schedule pages for several music venues I follow, so I can have them all on one page. Today I am getting a “refused to connect” error on one of them even though I can open that site in its own tab.

Can a site detect inclusion in an iframe vs. any other page request, and deny it?

Yes. The x-frame-options header X-Frame-Options - HTTP | MDN

I note that both Firefox and Chrome have addons that will override this security feature.

Chrome has a feature now where you can enable the addon only on certain pages. I would try enabling it only on the webpage of the site that doesn’t work in the iframe. That way you don’t override this security feature on every page.

I finally got around to doing this and it works like a charm. It never would have even occurred to me to look for such a thing. Thank you very much!