How X's algorithm really works (and how to beat it)
I analyzed X's open-source algorithm. Here's exactly what makes posts go viral - and what kills their reach.
The $44 billion question
When Elon Musk bought Twitter for $44 billion, he did something unprecedented - he open-sourced the algorithm.
For the first time ever, we could see inside the black box that decides which posts go viral and which die in obscurity. I spent weeks digging through the code, and what I found will completely change how you write posts.
The algorithm uses over 6,000 factors to score every single post. But here's the thing - only about 7 of them really matter for creators like us.
The first hour rule (this changes everything)
Here's the brutal truth: X's algorithm decides your post's fate in the first 60 minutes.
The code shows that early engagement gets weighted exponentially higher than later interactions. If your post doesn't get traction in that first hour, the algorithm basically gives up on it.
Think about it - you've probably seen posts from huge accounts with millions of followers that only get a few hundred likes. Why? They missed the golden hour.
The algorithm is watching for:
- how quickly people engage after seeing your post
- whether your regular readers interact (they check first)
- if it spreads beyond your immediate network
This is why timing matters so much. Post when your audience is active, not when you feel like posting.
The reputation score you didn't know you had
Every X account has a hidden "TweepCred" score between 0 and 100. Yours affects every single post you make.
This isn't about your follower count. The algorithm cares about:
- the quality of your followers (bots hurt you)
- your follower-to-following ratio
- how often your posts get reported or muted
- your account age and verification status
Accounts with high TweepCred get their posts shown to 3-5x more people initially. It's like having a permanent boost button.
Blue checkmarks do help, but not as much as you'd think. The algorithm gives separate boosts for legacy verified accounts and paid blue checks, but your overall reputation score matters way more.
Your reputation score updates slowly over months, not days. Focus on consistency and quality.
Why longer posts actually win (surprise!)
Forget everything you've heard about keeping tweets short. The algorithm actually favors "substantive content."
I found this in the code - posts marked as "low effort" get penalized. What counts as low effort?
- Super short posts (under 10 characters)
- Single word replies
- Just emojis or reactions
Meanwhile, threads and longer posts get:
- More total screen time (the algorithm loves this)
- Higher completion rates
- More meaningful engagement
The sweet spot isn't about character count - it's about substance. a thoughtful 200-character post beats a throwaway 50-character post every time.
The algorithm rewards depth over surface-level hot takes.
The engagement hierarchy (not all likes are equal)
Here's what the algorithm actually values, pulled straight from the code:
- retweets - weighted highest, uses logarithmic scaling
- replies - especially from people you don't follow
- likes - significant but less powerful than you'd think
- quote tweets - signals viral potential
- profile clicks - shows real interest
- bookmark saves - newer signal, gaining importance
But here's the kicker - the algorithm also tracks negative engagement:
- Getting blocked after someone sees your post
- "Show less often" clicks
- Reports for spam or abuse
One report can undo hundreds of likes. The algorithm remembers everything.
Different types of engagement have different weights in the algorithm.
The spam traps that kill reach
The algorithm has aggressive spam detection that accidentally catches regular creators. Here's what triggers it:
Instant reach killers:
- Posting the same thing repeatedly (even with small changes)
- Too many hashtags (more than 3 is risky)
- Excessive links in a short time
- All caps text (seen as shouting/spam)
- Following/unfollowing patterns
The link penalty is real - external links can cut your reach by 30-50%. The algorithm assumes you're trying to take people off-platform. That's why threads often outperform single posts with links.
Author diversity penalties - Post too much and the algorithm throttles you. It prevents any single account from dominating timelines. optimal posting is 1-5 times per day.
Once you trigger spam signals, it's hard to recover that post's reach.
The out-of-network penalty (why you're stuck in a bubble)
This one's painful - the algorithm heavily favors keeping you in your bubble.
When you reply to someone who doesn't follow you, that reply gets a visibility penalty. The algorithm calls this "reducing unsolicited interactions."
Your posts get shown in this order:
- Your followers (highest priority)
- Followers of your followers (if engagement is good)
- Topic communities you're part of
- General audience (only if you're crushing it)
Breaking out requires exceptional content signals. Most posts never make it past step 2.
Breaking out of your bubble requires the right mix of familiar and fresh.
The negative feedback doom loop
Here's the scariest part - the algorithm has a memory.
When your posts get negative signals (reports, blocks, "not interested"), It doesn't just affect that post. The algorithm reduces distribution for your future posts too.
Getting "ratio'd" (more replies than likes) is especially bad. The algorithm interprets this as controversy or low quality content.
The doom loop works like this:
- Bad post gets negative feedback
- Algorithm shows next posts to fewer people
- Lower reach means lower engagement
- Algorithm thinks your content is getting worse
- Repeat until you're shadowbanned
Recovering requires consistently good posts over time to rebuild trust.
Negative signals can tank your reach faster than positive ones can boost it.
Real example: why this post got 10m views
Let me break down an actual viral post using these factors:
The post: A thread about a hidden iOS feature, posted at 9am PST
- First hour: 500+ engagements (crushed the golden hour)
- Substance: 5-tweet thread with screenshots (high effort)
- Engagement mix: 60% retweets, 30% likes, 10% replies
- Spam score: Clean (no links, 1 hashtag, natural language)
- Network effect: Broke out by tweet #3
Why it worked:
- Posted when audience was active (morning commute)
- Educational content gets shared more (high retweet ratio)
- Visual elements (screenshots) boost engagement
- Thread format keeps people reading
- No spam triggers
Compare that to this flop from the same account:
- Single tweet with 3 external links
- Posted at 3am
- Generic "check out my blog" message
- Result: 47 likes from 100k followers
Your secret weapon: understanding the algorithm
Now that you understand these algorithm factors, you can optimize your posts before publishing.
Key takeaways to remember:
- Time your posts for maximum first-hour engagement
- Build your reputation score consistently over time
- Write substantial content that adds value
- Avoid spam signals like excessive hashtags
- Focus on generating retweets over likes
- Stay positive to avoid negative feedback loops
Apply these insights to your next post and watch your engagement improve.
The cheat sheet
Save this for later:
Do this:
- Post during your audience's active hours
- Write substantial, thoughtful content
- Use images/videos when relevant
- Build genuine engagement over time
- Vary your content types
Don't do this:
- Spam the same message repeatedly
- Use more than 2-3 hashtags
- Post more than 5 times per day
- Reply to people who don't follow you (too often)
- Use all caps or excessive emojis
Remember:
- First hour determines everything
- Your reputation score affects all posts
- Negative signals hurt future posts too
- Breaking out of your bubble is hard but possible
- The algorithm favors quality over tricks
Want to master the algorithm? Start by understanding these patterns in your own posts. The data is all there - you just need to know what to look for.
Based on analysis of X's open-source algorithm. Last updated: September 2024