Use of twitter card with redirection


I’m trying to post using a URL (i.e. that redirects to the final destination url (i.e.
The issue that I’m seeing is that the twitter card is not showing up (the twitter post becomes just a text with the URL but with no image).

I tried validating the URL using the card validator and it says it’s not whitelisted. In the case that doesn’t have any images to be scraped, but only the one on needs to be scraped, does still need to be whitelisted?


The white listing message is misleading - check the troubleshooting post Not Whitelisted, unable to render, or no image: READ THIS FIRST


Thanks. Do you know if the twitter card walks through all the redirections to the last url? Right now the is returning 302. That shouldn’t be a problem for twitter card to keep redirecting until it goes to 200 right?


You should see message about the redirection in the validator if that is working. As mentioned in the post we would need a URL to be shared to verify.


sample url -


When fetched using curl that page returns an HTML page with status 200. The page contains JavaScript that apparently does the redirect. There are no cards tags. The cards crawler cannot execute JavaScript so this will not work.


When I run curl -v,

< HTTP/1.1 302 Found

  • Server nginx/1.4.2 is not blacklisted
    < Server: nginx/1.4.2

it returns 302.
And if you access this page directly on the browser, it takes you to So in the end it’s redirecting to

So the reason why it’s not able to create the twitter card is because the twitterbot will not follow the redirection if it’s in the javascript? (found this post - Javascript redirection will not work for the Twitterbot?)


Can you check this one?
It should redirect it to without using javascript.

curl -v

  • Trying…
  • Connected to ( port 443 (#0)
  • TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • Server certificate: *
  • Server certificate: Symantec Class 3 Secure Server CA - G4
  • Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5

GET /dynamic_links/138? HTTP/1.1
User-Agent: curl/7.48.0
Accept: /

< HTTP/1.1 301 Moved Permanently
< Server: nginx
< Date: Wed, 08 Feb 2017 22:52:47 GMT
< Content-Type: text/html;charset=utf-8
< Content-Length: 0
< Connection: close
< Location:
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< Set-Cookie: BIGipServer~Public~shop.srm-integration_pp1_oraclecloud_com_80=rd2o00000000000000000000ffff0a566e96o80; path=/

  • Closing connection 0

that one seems work.


Is there any workaround that we can make the cards crawler execute? Since we have to use javascript to tracking some data.


I ran curl with the Twitterbot user-agent and I see something different. Either way, yes, Twitterbot cannot run JavaScript.

You will have to have a static HTML shim with card tags if you want to achieve this.


Do you have some examples, how can I do using card tags?


The cards documentation describes the format of meta tags required.

closed #14

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.