How do I prevent our content editors from posting short URLs

by Charles Belov   Last Updated May 23, 2020 01:04 AM

Is there a general regex or regularly updated list of short URL domains I can use to validate that links our content editors post on our website aren't using URL-shortener services? We want people to post the original link; since we're also not wanting editors to post visible URLs, there's no need for short URLs. And where there is a legitimate need for a short URL, such as for print or giving over the phone, we want it to have our domain on it for branding (we have a way to produce internal short URLs).

It would be easy to blacklist known .com URL-shortening domains such as tinyurl and digg. But with two-letter top-level domains, it seems like it would likely be a game of whack-a-mole, with new URL-shortening services likely to pop up all the time. Perhaps we could only permit two-letter top-level domains by whitelist, at the risk of slowing the ability of editors to post some legitimate links.

Are there any open solutions that are out there for this? I tried searching on "block url shorteners" (without the quotes) but only got results for URL shortening services or which mention that this site or that block posting such links, without saying how they do it.

A Drupal 7 or CKEditor solution would be ideal, but a generic code solution would work as well.



Related Questions


Should we still use abbreviations in short URL?

Updated January 07, 2018 18:04 PM

why would one post using shortened url

Updated May 09, 2018 00:04 AM

Does framing a website cause phishing alerts?

Updated March 27, 2015 05:01 AM

URL shortener for Apache, for the terminal

Updated May 01, 2016 08:01 AM

Using a Redirect as URL Shortener?

Updated April 11, 2018 20:04 PM