LR Link Gate keeps links to the domains you pick behind a permission. Anyone without it sees your own message where the link was, and the address isn't in the page at all.
What a member without the permission sees:

What a Supporter sees:

Why it's different
A lot of setups hide links with CSS or a bit of JavaScript. That looks right, but the address is still in the API response, so anyone can open developer tools and read it. If you're charging for access, that's a speed bump, not a gate.
Link Gate removes the address on the server before the post is rendered. For someone without the permission it never leaves your server: not in the page source, not in devtools, not in the API.
Setup
- Gated domains, one per line, like
mega.nz. Subdomains are included, so mega.nz also covers folder.mega.nz.
- What to show instead: the HTML shown where the link was.
- Plain wording: a short line for places HTML can't go, mainly notification emails.
- On the Permissions page, grant View gated links to the groups that should see real links. Nobody has it by default, and you can give it to as many groups as you like.
If your forum runs in more than one language, you get a box per language for the replacement message.


Who sees what
- Groups with View gated links: the post exactly as written.
- Everyone else, members and guests: your message.
- The person who posted it, and moderators: the post as written. Flarum already sends them the raw text so they can edit it, so hiding it from them would hide nothing.
Worth knowing
- Notification emails never contain gated links. There's no single reader to check when an email is built, so subscribers get your plain wording and open the discussion for the link.
- Search can show that a link exists. Someone searching
mega.nz may find the post. They still never get the address.
- Page caches must vary by user. If you run a full-page cache or CDN in front of your forum, it has to vary per user or skip discussion pages. Flarum's own caching is fine.
- Extensions that show a post's raw edit history are outside what this can reach.
Requirements
- Flarum 2.0 or later, PHP 8.3+
- On Flarum 1.8, Composer installs the older 1.x line instead.
Install
composer require linkrobins/link-gate
Then enable it under Admin, Extensions, add your domains, and grant the permission.
Source: https://github.com/linkrobins/flarum-link-gate
Packagist: https://packagist.org/packages/linkrobins/link-gate
Every release is posted below.