Learning Hub — Beginner's Guide
⭐ Beginner — No coding experience needed

What you will learn in this guide

1 What are Twitter Card tags — and why does your page need them?

Before you add any code, you need to understand what Twitter Card tags are, what they do, and what your shared links look like without them.

What Twitter Card tags actually are

Twitter Card tags are meta tags — small pieces of code — that you add to the <head> section of your HTML file. They tell X (formerly Twitter) exactly what title, description and image to show when someone shares your page link. Without them, X displays a plain text link with no image and very little context — easy for people to scroll past without clicking.

Are Twitter Card tags the same as Open Graph tags?

They are similar but separate. Open Graph tags control Facebook, LinkedIn, WhatsApp and most other platforms. Twitter Card tags control X specifically. That said, X will fall back to your Open Graph tags if Twitter Card tags are missing — but the result is often not as good as having dedicated Twitter Card tags. It is best practice to have both.

What do Twitter Card tags look like when they work?

There are several Twitter Card types. The most effective for most websites is the summary_large_image card — it shows a large image above the title and description, taking up significantly more space in the timeline than a plain link. This dramatically increases click-through rates on X.

❌ Without Twitter Card tags
yourdomain.com Plain link with no image, no title, no description. Easy to scroll past.
✅ With summary_large_image card
[Large eye-catching image] Emergency Plumber Manchester | 24/7 Available now — no call-out fee. Fast response guaranteed. yourdomain.com

2 Which Twitter Card tags do you need?

Twitter Card tags are simpler than Open Graph tags. Here is exactly what each one does and whether you need it.

The required tags — every page needs all of these

TagWhat it doesRecommended value
twitter:cardThe card type — this controls the layout of your shared link on Xsummary_large_image for most pages — shows a large image
twitter:titleThe headline shown on the card — maximum 70 charactersSame as your page title, trimmed if needed
twitter:descriptionThe description shown below the title — maximum 200 charactersA compelling description ending with a call to action
twitter:imageThe image shown on the card — must be an absolute URL starting with https://At least 1200×628 pixels for summary_large_image cards

Additional recommended tags

TagWhat it doesWhen to use it
twitter:siteYour X (Twitter) username — shown on the card as "via @username"Add this if you have an X account for your brand
twitter:creatorThe X username of the content authorAdd this on article pages if the author has an X account
twitter:image:altAlt text for your card image — important for accessibilityAlways include a brief description of the image

Which card type should you use?

Card typeWhat it showsWhen to use it
summary_large_imageA large image above the title and descriptionBest for most pages — gets the most engagement
summaryA small square thumbnail image to the left of the title and descriptionUse when you only have a small image available
appShows app store download linksOnly for pages promoting a mobile app
playerShows an embedded video or audio playerOnly for video or podcast pages — requires approval from X
💡 Use summary_large_image for 99% of pages. Unless you are promoting a mobile app or embedding video, summary_large_image is always the right choice. It gives your shared links the most visual impact and the highest click-through rates.

3 Check which Twitter Card tags your page is missing

Before you write any code, find out exactly which Twitter Card tags your page currently has and which are missing.

  1. 1 Go to the AIPageSEO audit tool Open a new browser tab and go to https://aipageseo.com/seo-audit-platform.html. You do not need an account.
  2. 2 Enter your page address and run the audit Type the full address of your page, for example https://yourdomain.com, and click Run Audit. Wait 10–30 seconds for it to complete.
  3. 3 Find the Twitter Card section Scroll down to the Social Preview or Twitter Card section. You will see which tags are present and which are flagged as missing. Make a note of every tag showing a red or yellow status.
  4. 4 Check View Page Source directly In your browser, right-click your page and choose View Page Source. Press Ctrl + F and search for twitter:card. If you get zero results your page has no Twitter Card tags at all and you need to add all of them.

4 Plan your Twitter Card tag values before opening any files

Before you open Notepad++ or FileZilla, write out all your Twitter Card values. It is much faster to plan them now than to do it while looking at code.

Your twitter:card value

For almost every page this will be summary_large_image. Use this unless you have a specific reason to choose a different card type.

Your twitter:title

This should closely match your page title and your og:title. Maximum 70 characters. Front-load the most important words.

Your twitter:description

Maximum 200 characters. Write something that makes people want to click — a compelling summary of what they will find on the page. End with a call to action where possible.

Your twitter:image

This must be the full absolute URL of your image, starting with https://. For summary_large_image cards the image must be at least 1200×628 pixels. You can use the same image as your og:image — the dimensions are almost identical.

Here is the complete set of tags ready to fill in:

Template — fill in your own values: <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@YourTwitterHandle" /> <meta name="twitter:creator" content="@YourTwitterHandle" /> <meta name="twitter:title" content="Your Page Title Here" /> <meta name="twitter:description" content="Your compelling description here — maximum 200 characters." /> <meta name="twitter:image" content="https://yourdomain.com/images/og-image.jpg" /> <meta name="twitter:image:alt" content="Brief description of what the image shows" />
💡 No X / Twitter account? Leave out twitter:site and twitter:creator — they are optional. The card will still display correctly without them.

5 Add Twitter Card tags to your HTML file using Notepad++

You now have all your Twitter Card values planned. In this section you will open your HTML file and add the tags in the correct place.

Where do Twitter Card tags go?

Twitter Card tags must go inside the <head> section of your HTML file. The best place is directly after your Open Graph tags — this keeps all your social meta tags grouped together and easy to find. They must go before the closing </head> tag.

  1. 1 Open FileZilla and connect to your server Fill in the four boxes at the top of FileZilla — Host, Username, Password, leave Port blank — and click Quickconnect. If you need help with this step, see the Before You Start guide linked above.
  2. 2 Navigate to your website folder and download a backup Double-click httpdocs (Plesk) or public_html (cPanel) in the right panel. Right-click the file you want to edit and choose Download. Rename the downloaded file to filename-backup.html in the left panel. Then download it again to your Desktop as your working copy.
  3. 3 Open the file in Notepad++ Open Notepad++ → File → Open → navigate to your Desktop → click the file → click Open.
  4. 4 Find where to add your Twitter Card tags Press Ctrl + F and search for og:image:alt. If found, you will add your Twitter Card tags on a new line directly after this line — keeping all social tags together. If your page has no Open Graph tags, search for </title> instead and add the tags after the closing title tag.
  5. 5 Click at the end of that line and press Enter Click at the very end of the line you found — after the /> — and press Enter to create a new blank line. Add a comment first to keep things organised, then type each Twitter Card tag on its own line:
    <meta property="og:image:alt" content="Description of your image" /> <!-- Twitter / X Card --> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@YourHandle" /> <meta name="twitter:creator" content="@YourHandle" /> <meta name="twitter:title" content="Your Page Title Here" /> <meta name="twitter:description" content="Your description here." /> <meta name="twitter:image" content="https://yourdomain.com/images/og-image.jpg" /> <meta name="twitter:image:alt" content="Description of your image" />
  6. 6 Check for existing Twitter Card tags first Before saving, press Ctrl + F and search for twitter:card. If a result is found elsewhere in the file, your page already has Twitter Card tags somewhere. Do not add duplicates — find the existing ones and update them instead.
  7. 7 Save the file Press Ctrl + S. The red dot on the file tab disappears when the file is saved and ready to upload.

6 Upload your file and test your Twitter Card tags

  1. 1 Switch back to FileZilla Click on the FileZilla window in your taskbar. If it has disconnected, fill in the boxes again and click Quickconnect.
  2. 2 Upload the edited file Find the edited file on your Desktop in the left panel. Right-click it and choose Upload. Click Overwrite when prompted. When the progress bar disappears the upload is complete.
  3. 3 Test with the Twitter Card Validator Go to https://cards-dev.twitter.com/validator. Enter your full page URL and click Preview card. You will see exactly how your page will appear when shared on X. If it shows an error, the error message will tell you exactly which tag is wrong or missing.
  4. 4 Also verify in View Page Source Open a browser tab and go to your page. Right-click and choose View Page Source. Press Ctrl + F and search for twitter:card. You should see all your Twitter Card tags listed correctly in the head section.
  5. 5 Run the AIPageSEO audit again to confirm Go back to https://aipageseo.com/seo-audit-platform.html, run the audit on your page again, and check that the Twitter Card section now shows all green passes.
✅ Tutorial complete — your Twitter Card tags are live and tested.

7 Common mistakes to avoid

  1. Using name= instead of property= (or vice versa) Open Graph tags use property= — for example <meta property="og:title">. Twitter Card tags use name= — for example <meta name="twitter:title">. Mixing these up means the tags will not be read correctly. Always double-check which attribute each tag type uses.
  2. Using a relative image URL instead of an absolute one The twitter:image value must start with https:// and include your full domain. Writing /images/og-image.jpg without the domain will not work. X cannot resolve relative URLs. Always write the full URL.
  3. Image too small for summary_large_image For summary_large_image cards, X requires images to be at least 1200×628 pixels. Images smaller than 300×157 pixels will not display at all. Always check your image dimensions before using it as your Twitter Card image.
  4. X showing old cached card data X caches card data just like Facebook does. After uploading your updated file, use the Twitter Card Validator to force X to re-read your page. Simply entering your URL in the validator tool clears the cache for that URL.
  5. Adding duplicate Twitter Card tags If your page already has Twitter Card tags and you add new ones without removing the old ones, X will use whichever it finds first — which may not be the correct one. Always search for existing twitter:card tags before adding new ones.
  6. Forgetting to save before uploading If you forget to press Ctrl + S in Notepad++ before going back to FileZilla, you will upload the unchanged file. Always check the red dot on the tab is gone before uploading.
Written by
John
Founder, AIPageSEO

Twitter Card tags are one of those things that take ten minutes to add and then work silently in the background forever. Every time someone shares your page on X, the difference between having them and not having them is the difference between a rich image card that gets clicks and a plain link that gets ignored. I wrote this guide so you never have to wonder why your shared links look wrong again.

Written by
John
Founder, AIPageSEO

I built AIPageSEO because every SEO audit tool I tried was either too expensive, too complex, or buried the things that actually matter behind a paywall. AIPageSEO is my answer — a free, no-sign-up platform with 75+ tools covering Core Web Vitals, E-E-A-T, schema generation, and AEO visibility for AI search engines like ChatGPT and Perplexity. I write these beginner guides because I remember exactly what it felt like to not know where to start — and I believe nobody should have to figure this out alone.