It is common to overlook the social sharing counts on your pages when you’re moving from one domain to another or migrating to HTTPS, particularly on blog posts. Those little numbers beside the icons may seem trivial, but social proof remains a key indicator of reputability and quality.
Unfortunately, these buttons are hopelessly attached to the current page address in a near-literal way — they do not follow redirected URLs. And that means that after a migration the buttons will likely show no shares at all.
So how do you prevent this from happening? It’s easy-ish. You just have to tell the buttons where the original page was located so that the original share counts are brought forward.
You could do this manually, but many platforms — HubSpot and various WordPress themes and plugins included — automatically insert social buttons on posts and pages, leaving no opportunity to manually edit where they point to. And, anyway, it’s totally better if you automate this sort of stuff.
This is the third in a series of three articles that will explain how we managed to preserve our rankings in the wake of a site overhaul:
- Part 1: Rebuild Your Site Without Demolishing Your Search Ranking
- Part 2: Your HTTPS Upgrade Could Put Your Search Rank in Danger
- Part 3: Losing Your Social Sharing Counts Could Cost You Credibility
Automating the Updates to Your Social Sharing Counters
This code simply swaps the
https:// part of the canonical link for
http:// and stores it in a new variable.
Moving from one domain to another? Here’s that snippet:
Then, you show the social buttons with the correct URL. Here’s what it looks like for our HubSpot site:
You’ll find similar code in your platform of choice, and it should be fairly easy for a web developer to modify it accordingly.
But it’s worth keeping in mind that preserving your social share counts is just one small step of many when building a new site. You need to make sure your content and sales funnels are deployed strategically, from your blog posts to deep-level marketing materials. Why not start by assessing your existing materials? Get started with a KAYAK Consult today.