How Do I Bulk Cloak All External Links on Wordpress Sites?

WPRefugee

Newbie
Joined
Dec 11, 2022
Messages
2
Reaction score
0
I need a Wordpress plugin capable of scanning all posts, extracting all external href attribute values, saving those values in the database, and serving links in a format like example.com/redirect/{ID}. This would ideally result in all off site links being served in that format. Then when the user clicks the link it should do a DB query to get the original href attribute value and redirect the user there.

I though surely at least one of the many Wordpress plugins that promote themselves as link cloakers would have such a feature but none of them do or at least don't in the free version. I refuse to try pro plugins without trials because all too often the feature they advertised doesn't turn out to be as good as they say.

All the plugins I have tried only allow people to manually create cloaked links one at a time by submitting the URL they want cloaked to a form. This cannot possibly work on auto-blogs. I have a network of auto-blogs each of which have tens of thousands of external links. I need a plugin that will cloak those and all future links created whenever a post is published.
 
Just to add, if nobody can find a plugin which does what I need I do, I intend to make my own but it would probably take awhile. I don't know much javascript and the dashboard for such a plugin would require an AJAX feature to allow it to run continuously until all links have been cloaked regardless of number. This will require a UI with a pausing feature as well since some of my sites have over 100,000 links and therefore will need to run the cloaking script for days at a time.
 
Back
Top