diff --git a/ghost/member-attribution/lib/outbound-link-tagger.js b/ghost/member-attribution/lib/outbound-link-tagger.js index 25b0e34538..d5b8346ef0 100644 --- a/ghost/member-attribution/lib/outbound-link-tagger.js +++ b/ghost/member-attribution/lib/outbound-link-tagger.js @@ -4,7 +4,9 @@ const LinkReplacer = require('@tryghost/link-replacer'); const blockedReferrerDomains = [ // Facebook has some restrictions on the 'ref' attribute (max 15 chars + restricted character set) that breaks links if we add ?ref=longer-string 'facebook.com', - 'www.facebook.com' + 'www.facebook.com', + 'web.archive.org', + 'archive.org' ]; /** diff --git a/ghost/member-attribution/test/outbound-link-tagger.test.js b/ghost/member-attribution/test/outbound-link-tagger.test.js index 51ddda6c5a..b763a888ec 100644 --- a/ghost/member-attribution/test/outbound-link-tagger.test.js +++ b/ghost/member-attribution/test/outbound-link-tagger.test.js @@ -82,6 +82,11 @@ describe('OutboundLinkTagger', function () { const updatedUrl = await service.addToUrl(url); should(updatedUrl.toString()).equal('https://facebook.com/'); + + const urlTwo = new URL('https://web.archive.org/'); + const updatedUrlTwo = await service.addToUrl(urlTwo); + + should(updatedUrlTwo.toString()).equal('https://web.archive.org/'); }); it('does not add ref if utm_source is present', async function () {