How to embed a Twitter (X) feed on your website.
To embed a Twitter feed on your website, X's free publish tool makes code for a profile timeline, a List or a single post. Here are the steps, and what our logged-out test found when the timeline would not load.
- Published
- Reading time
- 7 min read

On this page
The short answer
- X’s publish tool, publish.x.com, makes the official code to embed a Twitter feed on your website: a profile or a List timeline.
- A single post embeds from the post’s own menu: Embed post, then Copy Code. It rendered for a logged-out visitor in our test.
- The timeline did not. For a logged-out visitor it showed only its fallback link, and X’s server answered with “Rate limit exceeded”.
- Check any embedded timeline while logged out of X, in a private window, before relying on it.
- X’s embeds take height, width, theme and language. Hashtags, mixed networks and your own design need a tool built on X’s API.
How do you embed a Twitter feed on your website?
Use X’s publish tool. Go to publish.x.com, enter the address of a public X profile or List, choose Embedded Timeline, set the height and theme, and copy the code into your page. For one post instead of a feed, use the post’s own Embed post option. Both are free and need no developer account.
X offers two kinds of embedded timeline, according to X’s Help Center: a profile timeline, showing public posts from one account, and a List timeline, showing posts from a public List. It also offers embeds for single posts. Which one suits your page depends on how reliably it has to show up, as the tests below make clear.
| Method | What visitors see | What it takes |
|---|---|---|
| One post | A single post, with its photos or video | The post’s Embed post option, free |
| Profile or List timeline | Recent posts from an account or List | publish.x.com, free |
| A widget built on X’s API | Posts from accounts, hashtags or mentions, in your design | A tool, and X’s paid API behind it |
How do you embed an X timeline with publish.x.com?
Open publish.x.com, paste the address of the profile or List, and choose Embedded Timeline. Set the height, width, theme and language under the customisation options, then copy the code and paste it into an HTML block where the feed should appear. Only accounts with public posts can be embedded.
- Go to publish.x.com and enter the profile’s address, such as
https://x.com/YourAccount, or a public List’s address. - Choose Embedded Timeline. To change its look, open the customisation options: height, width, light or dark theme, language, and an option to opt out of X tailoring.
- Copy the code and paste it into an HTML block on your page. Our install guides show where that block is on each platform.
<a class="twitter-timeline" data-height="600"
href="https://x.com/YOUR_ACCOUNT?ref_src=twsrc%5Etfw">Posts by YOUR_ACCOUNT</a>
<script async src="https://platform.x.com/widgets.js" charset="utf-8"></script>The code is a plain link with the class twitter-timeline, followed by X’s script. The script replaces the link with the timeline. If the timeline cannot load, the link is what stays on your page. Setting a height in the options adds data-height to the link, as above.
Two conditions come with it. Timelines only show accounts whose posts are public, and X’s Help Center notes that by using embedded timelines you agree to its Developer Agreement and Policy.
Does an embedded X timeline still work for visitors?
Not reliably, in our test. On 11 October 2026 a timeline built with publish.x.com showed only its fallback link to a logged-out visitor, and X’s server answered further requests with “Rate limit exceeded”. A single post embed rendered in the same test. Check your own page logged out of X before relying on a timeline.

The script did its part. It found the link, marked it as rendered and created the timeline’s frame, but the frame stayed empty. X’s timeline server returned the posts to one direct request, then refused further requests from the same connection with HTTP 429, the code for too many requests. X does not document a limit for embedded timelines, so we cannot tell you how often your visitors will meet it. We can tell you how to find out.
How to check your own timeline
- Open your page in a private window, so you are not signed in to X.
- Reload it a few times, and try it on a phone on mobile data, which is a different connection.
- If you only see the link text, your visitors may too. Use single post embeds, or a tool that does not depend on X’s timeline.
How do you embed a single X post on your website?
Open the post on x.com, select the menu icon in the post, then Embed post. That opens publish.x.com with the post loaded, where you can set options and, for a reply, hide the conversation. Select Copy Code and paste the code into your page. Embedding is only available on x.com, not in the app.

<blockquote class="twitter-tweet">
<p lang="en" dir="ltr">The text of the post, exactly as it was published.</p>
Name (@account)
<a href="https://x.com/account/status/POST_ID">February 12, 2026</a>
</blockquote>
<script async src="https://platform.x.com/widgets.js" charset="utf-8"></script>Unlike the timeline, the post code carries the post’s words inside a blockquote in your own HTML. X’s script then turns it into the styled card above. Per X’s Help Center, an embedded post can show photos, videos and link previews, and embed code is not available for protected posts.
What happens to an embedded post if it is deleted?
The text stays on your page. X’s Help Center says that if a post is deleted, made protected, or its account is suspended after being embedded, the text of the post remains visible but X’s script no longer loads its media. The words were copied into your HTML when you embedded it.
That is a useful side effect of the post code’s design. The words sit in your page as ordinary HTML, so they are readable before X’s script loads, by visitors whose browsers block it, and by search engines. A timeline carries no such text: its posts only exist once the script has drawn them. How search engines treat feeds drawn by scripts is covered in how social media feeds affect SEO.
When do you need more than X’s embed codes?
When the timeline will not load reliably for your visitors, when you want posts from a hashtag or mentions rather than one account, when the feed has to match your design, or when you want X posts beside other networks. Each needs a tool that reads posts through X’s API instead of X’s timeline script.
A Twitter feed widget from Vitraz reads posts through X’s API on our side, so nothing on your page depends on X’s timeline script. It can follow any public account’s own posts, leaving out replies and reposts, or a hashtag or mentions from the last seven days, which wait for your approval before they appear. Because every post X’s API returns is billed, X sources are part of the paid plans from Studio, and they refresh as often as every three hours.
Questions people also ask
No. X’s embedded timelines only show accounts whose posts are public, and embed code is not available for posts from people who protect their posts. A protected account has to make its posts public before they can appear on a website.
Not with X’s own tools. publish.x.com embeds profile timelines, List timelines and single posts. A hashtag feed needs a tool that searches X through its API, and X’s recent search covers the last seven days.
The link is the code’s fallback, and it stays when the timeline does not load. In our test that happened to a logged-out visitor while X’s server was answering with “Rate limit exceeded”. It also happens when the account is protected or a browser blocks X’s script.
Only through the options publish.x.com offers: height, width, a light or dark theme, and language. The fonts, layout and colours are X’s. A feed in your own design needs a tool that renders the posts itself.
Sources
- 1.How to embed a timelineX Help Center
- 2.How to embed a post on your website or blogX Help Center
- 3.X PublishX
Keep reading
Put real posts on your site, where Google can read them.
One deferred script, rendered into your page, no cookies. Your first feed is free and needs no card.
Build your first feed