Forum:URL shortener

ShoutWiki — express yourself and be heard!
Jump to navigation Jump to search

Forums: Index Community help

I have some footnote citations to things like an author responding to a review on Amazon.com but the spam filter won't allow TinyURL, or Bitly to be used as a URL shortener for the ungodly long URL of:

https://www.amazon.com/review/R2ZDZN1PG672BX/ref=cm_cr_rev_detmd_pl?ie=UTF8&asin=0989238113&cdForum=Fx2WIU69PCKCW9Q&cdMsgID=MxIETTSTF46V7Z&cdMsgNo=1&cdPage=1&cdSort=oldest&cdThread=TxJAA3ZO7MDTO8&store=books#MxIETTSTF46V7Z

Is there a secure, URL shortener method that can be used on my wiki that won't run afoul of the spam filtering? – Mitchell Gore (talk) 08:43, 6 December 2019 (UTC)

You can override a blacklisted site or URL by placing it in MediaWiki:Spam-whitelist on your wiki. There are no "secure" URL shorteners. Spammers use URL shorteners to bypass other checks for prohibited links. That said, the format of MediaWiki:Spam-whitelist (and MediaWiki:Spam-blacklist, if you want to add any) is a modified regex. For example, a Spam-whitelist like
 #<!-- leave this line exactly as it is --> <pre>
# External URLs matching this list are not blocked when added to a page.
# This list overrides blacklists, including the global blacklist.
#
# Syntax is as follows:
#   * Everything from a "#" character to the end of the line is a comment
#   * Every non-blank line is a regex fragment which only matches hosts inside URLs

\btinyurl\.com\b

 #</pre> <!-- leave this line exactly as it is -->
would unblock the entire tinyurl.com domain. You can also block or unblock specific URLs by extending the specificity of the list entries. You can read more at mw:Extension:SpamBlacklist. --Saftzie (talk) 20:20, 6 December 2019 (UTC)
Thanks for the response. It would be great if there was an actual URL shortner extension that proved that functionality internally within the MediaWiki software itself. The above massively long URL I had issues with when shortening, does work and can be used in my Wiki directly with our getting flagged. Its only when it is shortened by any of the URL shorteners online, does it get flagged. But I will go through the whitelisting info you suggest and try out what would work best. — Mitchell Gore (talk) 23:09, 6 December 2019 (UTC)
URL shorteners, in general, are not a great idea. It hides the real target address, increases load time by having to hit two servers, and has little purpose in a wiki. Their only real purpose is for creating memorable addresses (not needed in a wiki) and where you've got a character limit. You can cut almost all of that URL example you've given because the referral and encoding data can all be removed. Having tested it, https://www.amazon.com/review/R2ZDZN1PG672BX/ provides the exact same link. --Lewis Cawte (talk) ShoutWiki Staff 15:52, 10 December 2019 (UTC)