Tweet buttons not handling HTTP 301 redirect response codes


#1

I recently resctructured a website and moved a subdomain to a subdirectory (ie subdomain.domain.com became domain.com/subdomain). There are a lot of ‘Tweets’ on pages at the old URL and we would like to keep the count for the new URLs. Facebook has a method in place which let us keep the ‘Likes’ and I was hoping Twitter had something similar but was not able to find any information in the documentation.

The old URLs are 301 redirected to the new URLs. Does Twitter support the HTTP redirect standard?


#2

Having the same issue, only in our case, there are two 301 redirects… e.g.

http://alpha-site.com/foo => http://www.alpha-site.com/foo

… and then…

http://www.alpha-site.com/foo => http://foo.beta-site.com


#3

Can we expect something about this issue?


#4

I’m afraid we don’t presently have a system to transfer counts between URLs. However, the Tweet button provides an attribute to set the data-counturl, so for older pages you could set it to the previously counted URL, to maintain the current count. For new pages, you would use the new URL.

Ben


#5

Thank you very much. That should do the work for now.


#6

How exactly do you do that Ben? I don’t know how to do any of this… at all…


#7