NordPass Special Offer
SHOW NORDPASS
NordVPN Special Offer
SHOW NORDVPN

How to clean Twitter and X links

Published · 3 min read

Clean a link now

Two separate things happen to links on X, and they are worth separating because the fixes are different.

Links you share out of X pick up an s parameter recording which client you used. Links posted inside X get rewritten entirely through t.co, the platform's own redirect domain.

The s parameter on shared posts

Copy a post link from the app and you get something like this:

https://x.com/someone/status/1234567890123456789?s=46&t=8f2a1b9c3d
            

/someone/status/1234567890123456789 identifies the post. That is all that is required.

s records the source of the share. Different values correspond to different clients: the iOS app, the Android app, the web interface. s=20 and s=46 are the two most commonly seen.

t is a token accompanying the share.

Neither affects what loads. Both can go:

https://x.com/someone/status/1234567890123456789
            

t.co, which is a bigger deal

Every link posted in a tweet gets rewritten. If I post a link to my own site, what appears in the post is not my URL. It is a t.co address that redirects to it.

This is not optional and it cannot be disabled. It applies to every link from every account.

The practical effects are worth listing plainly. Clicks are counted before you are forwarded. The destination is invisible in the link itself, so you cannot see where a link goes before opening it. And if t.co is unavailable or blocked on a network, the link does not resolve at all, even though the destination is perfectly fine.

That last one is the reason I have opinions about t.co rather than just noting it exists. A link is supposed to be a durable pointer from one place to another. Routing every one of them through a single company's redirect service makes every link on the platform dependent on that service continuing to run. Facebook does the same thing with l.facebook.com, described in what is fbclid, and LinkedIn with lnkd.in. It is now normal, and I still think it is a slightly strange thing to have accepted.

Since t.co hides its destination, there is nothing to clean in the URL itself. You have to open it and clean the address you land on.

twclid

If you have arrived at a site from a promoted post, you will find twclid on the landing page URL. It is X's advertising click identifier and behaves like fbclid or gclid. Safe to remove, and it does nothing without the matching pixel on the destination.

You may also see ref_src and ref_url on links pointing back into X, which record the page an embedded tweet was displayed on.

A note on what this site's cleaner does with X links

Worth being upfront about, because it is a deliberate choice rather than a bug.

When you paste an X or Twitter link into the links cleaner, it strips the parameters and also rewrites the domain to fxtwitter.com. That is a third-party service that serves the same post but produces working previews in chat apps, which X's own links frequently do not.

If you want the plain X address instead, delete the query string by hand and leave the domain alone. The parameters are the only part that carries tracking. The domain rewrite is a convenience, and it is a reasonable thing to not want.

Cleaning by hand

Keep the username and the numeric status ID. Delete everything from the question mark. That covers every case except t.co links, which have to be opened first.

x.com and twitter.com both still resolve to the same content, so either domain works.

Related reading

Reddit's share links behave similarly and are covered in how to clean Reddit links.

Full parameter list: the URL tracking parameter glossary.

Frequently asked questions

What does s=20 mean in a Twitter link?

It records which client the link was shared from. It has no effect on the post.

Can I stop my links being wrapped in t.co?

No. The wrapping is applied by the platform to all posted links.

Is t.co safe?

It is X's own domain rather than an unknown shortener. The issue is not safety, it is that the destination is hidden and the link depends on the redirect service.

Do twitter.com links still work?

Yes. Both domains resolve to the same content.

What is twclid?

X's advertising click identifier, appended on clicks from promoted posts.


Sources and further reading