Add-on Block url shortened links


Well-known member
I'm looking for help figuring out a way to block any links that are posted by users using some of the popular url shortening services -,, tinyurl, etc.

I know that I can use the censorship function to censor the links, but I'd prefer for the system to throw back an error to the user when they try to submit a post using a shortened link.

The error would be something like
I'm sorry, you cannot post shortened links on this site. Please submit your post again with the original url of the site you would like to link to.

The reason for this add-on would be 1) To keep users from posting links to sites we do not allow links to, and 2) To ensure that all links are properly monetized.

I can certainly offer some money for the creation of this add-on.

Chris D

XenForo developer
Staff member
I have kinda worked out how to do this, but I need some advice on making it an add-on.

The way I've found of doing this is by editing a protected_function and as far as I'm aware, that's a no go in terms of an add on unless you edit the core files. That will achieve what you want, but not ideal.