Page MenuHomePhabricator

Provide special page to show warning to users clicking on external or non-forwarded interwiki links
Open, LowPublicFeature

Description

Proposal

Provide a Special page ("Special:ExternalLink") that warns users they are leaving the wiki's domain when clicking on an external link.

Context

Currently, you can create a link on a wiki page to an external domain. A user can click on this link and be taken to an external domain without necessarily realizing what's happening.

It would be useful to be able to remind users that they are leaving the site, to be careful with which links they follow. This would be similar to what Google Meet does for some external domain URLs, and what LinkedIn does.

If we wanted to be less disruptive, we could use the external links table to only show the Special:ExternalLink warning page for domains that are rarely used. Or we could use CommunityConfiguration to allow communities to safelist domains that don't need a warning.

We could also only show the warning for links that are not in content namespaces.

From a technical implementation, we'd probably need some JavaScript that scans page content for external links, and rewrites the URLs to take the user to Special:ExternalLink?url=https://somesite.test?123

Examples

Discord
image.png (626×972 px, 65 KB)
Airbnb
image.png (652×1 px, 131 KB)

Event Timeline

bd808 changed the subtype of this task from "Task" to "Feature Request".Jan 9 2025, 8:51 PM

From a technical implementation, we'd probably need some JavaScript that scans page content for external links, and rewrites the URLs to take the user to Special:ExternalLink?url=https://somesite.test?123

This sort javascript of solution could also be a global gadget. Not everyone allows javascript to execute from the wiki context (https://www.mediawiki.org/wiki/No-JavaScript_notes) however.

A more robust solution would be for the parser to emit anchor tags with an href targeting Special:ExternalLink. This could be combined with javascript to bypass the interstitial warning page for users who wanted to opt-out of the warning globally or via some allow list.

One thing to keep in mind while designing and implementing something like this is that it has the potential to accidentally generate toxic user data recording external link usage. Care should be taken to restrict the logging related to this feature to the narrowest viable dataset. I think this would mostly mean attempting to treat the interstitial in the same way that we treat article page views which also have this potential for generating a toxic dataset tracking what has been read by whom.

This is a fundamentally anti-web request and will result in user complaints. And on top of that, I can think of at least one accessibility guideline which this would be counter to: links should act the same whether they're internal or external (vice the other common practice of some websites of always opening external links in a new tab/window). And is definitely unfriendly for anyone parsing our HTML for other reasons.

I can only assume there was another event that caused this task since this is the second similar item showing up in my inbox today, please consider connecting that if it's not already connected.

I can only assume there was another event that caused this task since this is the second similar item showing up in my inbox today, please consider connecting that if it's not already connected.

Yeeeaaah, I’m going to get a gander and point at… this

Should be straightforward technically via the LinkerMakeExternalLink hook, but yes it would raise all kinds of SEO and usability and tool B/C issues, and on Wikimedia sites it would increase the amount of user tracking (currently we don't learn about a user clicking a link, I think it would be hard to avoid that data getting at least into the webrequest table).

Should be straightforward technically via the LinkerMakeExternalLink hook, but yes it would raise all kinds of SEO and usability and tool B/C issues, and on Wikimedia sites it would increase the amount of user tracking (currently we don't learn about a user clicking a link, I think it would be hard to avoid that data getting at least into the webrequest table).

Yeah I can’t really see this on WMF, at closest would be a setting in core and add to ComConfig? I think this can be made into an extension for third parties to use though.

Bugreporter2 subscribed.

Please don't do this.

This is going to be incredibly annoying if implemented.

I agree that prompting for every link is massive overkill. But there should be a warning when clicking on a spam-blacklisted link, e.g. in an old revision.

Bugreporter renamed this task from Provide special page to show warning to users clicking on external links to Provide special page to show warning to users clicking on external or non-forwarded interwiki links.Jul 19 2025, 5:21 PM