Clean Links Reddit Bot
Moderators install it, and in its default reply mode, a post or comment that shares a tracked link gets one reply: the clean link, and the names of the parameters it removed.
What Does the Clean Links Reddit Bot Do?
u/clean-links-app is a Devvit app that a subreddit's moderators install. When a new post or comment carries a link, the bot cleans it with the rule set the Clean Links app uses: it strips tracking and affiliate parameters, follows short links and redirect wrappers, and expands Reddit's /s/ share links to the post they point at. If the cleaned link differs from the original, the bot replies once, in English. It skips AutoModerator, accounts with Reddit's App label, and its own replies.
Cleaned link: https://www.reddit.com/r/privacy/comments/abc123/example_post/
Removed: share_id (Share tracking ID), utm_content (Marketing campaign content variant), utm_medium (Marketing campaign medium label), utm_name (Marketing campaign tracking tag), utm_source (Marketing campaign source label), utm_term (Marketing campaign keyword)
^(Clean Links bot ยท what this is and what it stores: cleanlinks.app/en/reddit-bot)How Do Moderators Install the Bot?
The bot runs only in subreddits whose moderators install it from Reddit's App Directory, and it follows the settings they pick. A subreddit that has not installed it never hears from it.
Open the Clean Links bot in the App Directory
What Moderators Can Set
- Mode
reply, the default, posts the reply.reportreports the post or comment to the subreddit's moderators instead.dry-runposts nothing, reports nothing, and writes one log line of counts per item. Inreportanddry-runthe bot still sends links to the server, because it needs the cleaned result to act on.- Custom footer line
- Your own text, shown above the link to this page. That link always stays.
- Domain allow list
- The domains the bot acts on, such as
youtube.com. An empty allow list means every domain. - Domain deny list
- The domains the bot leaves alone. Deny wins over allow. Both lists match the registrable domain of the original link and of the cleaned one, so
youtube.comalso coversm.youtube.com. The bot checks them after the server responds, so links on an excluded domain still reach it. - Replies per hour
- A cap on the bot's actions per hour in your subreddit, from 1 to 50, with 30 as the default. Replies, reports and dry-run log lines all count toward it. The bot checks it before it calls the server. Items over the cap are counted and skipped, never queued.
What Does the Bot Store?
Links posted in a subreddit that installed the bot are sent to our server, which cleans them and follows their redirects. The Clean Links app cleans links on your iPhone, iPad, or Mac; that does not apply to the bot. This is everything the bot keeps, and where.
On Our Server
- Server table
reddit_bot_events, one row per URL whose cleaned form differs from the original, written inreplymode only: post-resolution cleaned host, removed parameter names, whether a redirect was resolved, subreddit name, timestamp. - Kept indefinitely and readable by the operator's Grafana role.
reportanddry-runwrite no rows, and failed calls write nothing.
In Devvit Redis
- Devvit Redis: processed Reddit item IDs (7 days) and parent-ID to our-reply-ID pairs (12 months).
- A scheduled job deletes each reply before its parent-to-reply pair expires, so no reply outlives its lookup.
- When the parent post or comment is deleted or removed, the bot deletes its reply.
- Hourly counters for the per-hour cap, and a 15-minute pause flag set when the server refuses the token or is switched off. They hold no IDs and expire within two hours.
The bot's own logs carry status codes, error names, counts, parameter names and the subreddit name only.
Never full URLs or Reddit user IDs anywhere; Reddit item IDs live only in Devvit Redis.
What the Bot Never Does
- It never posts an App Store link.
- It never sends direct messages.
- It never votes.
- It never edits anyone else's posts or comments.
Read the Source Code
The bot's code is public under the MIT license. Its README documents exactly what leaves Reddit and what the server sends back, so you can check every claim on this page against the code.
Clean One Link Now
Got a single link to clean? Paste it into the Clean Links web cleaner and it strips the tracking parameters and shows you what it removed.
Open the link cleaner