Twitter Button counts remain zero for AJAX-based hash-tag url driven site


I develop a site that uses hash-tag URLs to pull pages via AJAX form the server. These pages have tweet buttons (tried both HTML5 and iframe versions). The tweet buttons draw correctly, but the counts remain zero.

Here’s an example:!/live/
(It’s been tweeted more then once)

Does the twitter tweet button not work with hash-tag based urls in AJAX-driven sites?

Thank you very much,


This is a tricky one – it’s technically possible for the Tweet Button to count these URLs, but your server might have to play along with a bit of a rouse. The Tweet Button requires that the specified URL be observable via a HTTP HEAD request… right now, your server returns a 404 Not Found for your URL, so it’s as if it doesn’t exist. You may want to provide an alternate form of your content accessible by a URL format your server can understand and see.

curl -I "\#\!/live/" HTTP/1.1 404 Not Found Date: Mon, 31 Oct 2011 14:52:38 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 15335


Thanks for the relpy!

I do follow the Google spec for AJAX crawlable pages (, so there is a ?escaped_fragment=/live/ page (or will be after tomorrow), but I don’t know how to tell Twitter that it can get its HEAD information from there. If I use the counturl to specify the ?escaped_fragment version then the /#!/ version wont have any counts associated with it, right?
For example:!/concert/distractions/20055005-3738523


Try using the verbose URL with the ?escaped_fragment parameter as your data-count-url argument to the Tweet Button like so:



I tried using this tag


on this page

But alas, the count hasn’t incremented despite me tweeting it twice.

I used curl -I “” and got a successful head request

HTTP/1.1 200 OK
Date: Wed, 02 Nov 2011 20:23:23 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 9958

Is there anything else I can try?
Thanks again for your help!


Do you have an example Tweet that you issued for ? I just did a test post and the count has updated.


Holy cow, the count finally incremented! Thank you for your help!
It took all day to see my two test tweets reflected on the page, but now I know how to do it.

I’m sorry my question was so simple to answer, I should have figured it out without bothering you guys. I’m sure you get tired of telling people the same solution involving the HEAD request.

Thanks again!


No worries, this is a use case which we should probably document better. Please follow up if you see any further issues.


Hi guys I’m having the same problem (sorry for opening this old post, but it’s very relevant).

I did add “escaped_fragment=” to the link, the count never updates, until I tested it by tweeting the link with “escaped_fragment=” not with the hashbang characters, then the counter updates.

At this time, I don’t understand what could be the problem. Any idea?


Hi, we also have a web site which uses AJAX crawlable URLs but our Tweet buttons do never increment,

In our case the URL structure is a little different, for example we have this URL :!slides?feedback=4333

The corresponding ‘escaped’ form is (this is what Fetch as Google Bot uses) :

So, we’ve created the following button :


The result of the curl command seems to be good :

$ curl -I HTTP/1.1 200 OK Accept-Ranges: bytes Age: 0 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Content-Type: text/html; charset=UTF-8 Date: Sun, 15 Dec 2013 12:38:11 GMT Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Server: Apache Set-Cookie: verygoodmoment=sl13fh0nesvafkhgsjombo3381; path=/ Set-Cookie: verygoodmoment=pi7i24jjr9u5l14btdo1rkpgu5; path=/ Vary: Accept-Encoding Via: 1.1 varnish X-Varnish: 99670627 Connection: keep-alive

But the button never increments, I’m wondering if this could be because our URLs have in fact 2 “parameter declarations”, ?escaped_fragment and ?feedback=4333.

Is the URL valid for Twitter ?

Do we are to refactor all our URLs to have something like!slides/feedbacks/4333 and ?