Changing doesnt-exist-not-found functionality to encourage users to join?

I have a discourse community that has some content which is public and some which is private. I’d like to change what it does when you try to access—while not logged in—a page which exists, but you don’t have access to.

So a sort of “that page is private” — that is, remove the “not found” concept, expose that the page does exist (by saying “that page is private”), and then encourage people to sign up.

We’re using SSO for user management.

This is a major roadblock for people who aren’t community members as they “bounch off” of deep links that we are sharing, rather than being encouraged to sign up to continue on.


So far, the only thing I can think to “adjust” is the page_not_found.title text in the Admin > Customize area. I changed it to read:

You need to be logged in to view that page — or maybe it really doesn’t exist. To learn more, see the QUICK TOUR topic below.

We have a topic named “Welcome — Quick Tour” which is publicly viewable. We tend to drive a lot of traffic to that page. (eg, we use short urls like to redirect to the deep link to that quick-tour topic.) So it tends to appear in the list of topics that appear on the page-not-found page.

Unfortunately, that title change is weak sauce.

Can I inject static content into that page?

The DOM for that page has a lot of selectable properties; IDs and classes.

Is there any way I can modify my theme, to inject something on this particular page? A block of content where I can explain how to join?

Yes, there’s a LOGIN button at the top. No, people don’t reach for that on a site where they’re bouncing off a deep link. And even if they did, our SSO provider (I’m glaring at you does not include a, “don’t have an account, join here,” affordance on their sign in page. So the login button is a dead end.

I need to add copy and link(s).

1 Like

There is a new site setting to enable a more verbose 404 that reveals secret information, such as “you tried to load a PM you don’t have access to”, rather than a generic 404.



Yes, that got covered out in the public topic where I started this, before I split this to a support dm. I tried it, but it’s not powerful enough to “catch” the people who are [as I call it] bouncing off a topic that exists, and would be visible if they logged in.