WorryFree Computers   »   [go: up one dir, main page]

AddToAny Blog

Get back your share counts after a move to HTTPS or a URL change

August 6th, 2018

AddToAny Share Count Recovery is a free & mighty feature for publishers using share counters.

You can recover lost share counts when moving to HTTPS, a new domain name, or a new URL structure. A previous URL’s share counts are simply added to the current URL’s share counts, so you won’t lose your new counts.

AddToAny Share Count Recovery

HTTPS + HTTP

As websites transition from plain HTTP to encrypted HTTPS, publishers are finding that share counts — especially Facebook Likes — reset to zero. This is because Facebook considers http://example.com/ and https://example.com/ to be completely different URLs.

Facebook offers technical guidance on how developers can redirect URLs and exempt their crawler from redirects to retain share counts. This is doable for some developers and WebOps teams, but the Facebook crawler exemption can be difficult to setup, awkward to maintain, and it still doesn’t cover Pinterest and Reddit.

With AddToAny share count recovery, it’s just one line to combine counts for the HTTP and HTTPS versions of shared URLs.

HTTP recovery applies to Facebook, Pinterest, and Reddit. Some services — such as Tumblr — are ‘protocol neutral’ with shared URLs, meaning they consider http://example.com/ to be the same as https://example.com/. So if you’re only recovering HTTP counts, AddToAny skips the extra lookup for unaffected services such as Tumblr.

New domain + Old domain

Whether you’ve switched to a new domain name or a new subdomain, AddToAny has your domain recovery needs covered too.

Just place your old domain name in a line of code as demonstrated in the share count recovery docs.

New path + Old path (and other URL changes)

For more complex changes, AddToAny lets you script out your own recovery logic within a custom JavaScript function. A helpful data object is passed to your custom recovery function, making it convenient to reconstruct an old URL structure based on parts of the shared URL, such as the domain, protocol, and pathname parts. You can also get values from any HTML data-* attributes you may have provided, such as a post ID, day, month, or year.

Recover share counts with AddToAny

See the WordPress, Drupal, and HTML guides for how to use share count recovery to get your share counts back.