One suggestion is to make a request in the URL. If it detects redirection, it may be a "shortening", but it may not be and would then be preventing legitimate URLs.
From this point on, compare the number of characters. If it is smaller than X it increases the likelihood of being a shorter and discards larger URLs that redirect, but are not shortened.
It looks good so far, but in practice, it does not work.
Let's take a real example:
tinyurl.com < - is a URL shortener for globo.com is smaller than tinyurl.com but is not a shortcutser.
r7.com < - is smaller yet.
So the logic in comparing the URL or domain size is not valid.
Maybe you should ask yourself, what's the point of detecting if it's a URL shorter?
If it's because they redirect a URL, then they could only validate the redirect, regardless of whether it's a shorter or not.