When you’re planning a rebranding, changing domain names, or changing your site permalink structure, there are a million fiddly little details you have to keep in mind. One of them, which we often take for granted and which is likely to slip through the cracks, is your social media engagement.
Google treats your site URLs as the foundation of a page. If www.example.com/blog/post1/ is changed to /post2/, Google will treat them as different pages entirely. Now, with Google, there are ways to get around this. You can perform a site redirect, telling Google that post2 is the real post and that post1 has moved. Redirects work, but they do tend to lose some PageRank along the way. You can also use canonicalization to help, though the real purpose of the rel=canonical tag is to deal with URL parameters and other side causes of disparity.
That’s all fine for Google, but what you might not realize is that social media plugins work the same way. They pull their share counts from the API of the social network in question, by querying the URL of the post. If the URL of the post changes, the social media plugin will query the API for the new URL, and will return nothing, because the page is too new. All of your old shares still exist, but the old URL doesn’t match the new one, so you’re left without recourse.
Are there any options for recovering your social shares for your old posts? Let’s investigate.
The first option is to simply abandon the old shares. Now, I know this goes against the very question we’re trying to answer, but hear me out. How much do you really need the shares and social proof for your old posts? In a lot of cases, those posts aren’t getting much traffic, if any at all. Traffic to old posts tends to die off pretty quickly over the course of the months following their publication, and posts older than a year need to be something very special to keep getting traffic.
Now, if your old posts are evergreen giants and happen to be pulling in quite a bit of traffic, and if you’ve noticed a drop in traffic directly resulting from the loss of social proof, then by all means skip this section. If, however, you find that you can’t determine any lost traffic due to the loss of social shares, you might consider just leaving them gone.
The problem with testing for this method is that, generally, the first time you notice you’re getting less traffic is after the URL migration. Google will take a while to adjust to your new URL and to redirect all of the value of your old URLs to your new URLs. It should be a relatively seamless transition, except of course for the issue with social shares. The trouble is, any redirect, any change, is going to shake up things around the web. Some pages might not load. Some links will be broken. Some glitches will crop up in indexing and search ranking. It will be pretty difficult to determine whether or not any loss of traffic comes from the social shares or from the myriad other sources at work.
My recommendation, then, is this; just leave old posts without shares, and focus on promoting your new posts to gain shares where they’re visible and matter. Now, I don’t mean just letting the social sharing plugin read 0 for everything. A 0 is worse than no number at all. Most social sharing plugins have a way to set whether or not to display a number, and some even have minimum thresholds for the share count before the number displays. In either case, you can set it so that your old, low-traffic posts don’t display a number.
Heck, with both Facebook and Twitter making it difficult or impossible for many social media sharing button suites to even show share counts in the first place, this may actually help you, as the whole thing looks more uniform and less skewed.
This is probably going to be the least popular option (unless you changed your URL by accident), and I’m only listing it as a way to discuss how bad of an idea it is. Simply put, you can revert your changes and go back to your old URLs.
There are a lot of ways this can go wrong. For one thing, if you’ve already made permalink changes or changes throughout the web regarding your URLs, you have to un-make all of those changes, and some may slip through the cracks. You have to undo all of the work you did changing over the URLs, all to save some social proof. The absolute only reason you might consider this is if the URL change was exceedingly simple, like adding or removing a /blog/ bit from the URL.
There’s no way any brand of sane mind will even consider this option in a major rebranding operation or large URL overhaul. Changing your actual root domain is a huge deal and can’t be lightly reverted, particularly once you’ve put some permanent redirects in place or once Google has had more than a few hours to reindex your site. You would be triggering all of the issues of a URL change a second time, and then if you rethought it and re-implemented the change again, you’re just hammering yourself down.
There are also all of the small possible problems that can crop up, like someone poaching your domain name in the time it’s lapsed, and who knows what else. The fact is, your social share counts simply aren’t that valuable compared to everything you stand to lose by messing around with your URL as much as this solution would require. It will save your share counts, sure, but it’s just not worth it.
This is your most likely option if you really, really want to save your old social shares. However, in order to pull it off, you will need full access to the code that is running on your site, and enough knowledge of how it all works to be able to make changes to it without breaking everything. Before you begin, I recommend making a full backup, just in case something you do has dire consequences.
What you need to do is find the files or database that regulates what your social sharing plugin does on a per-page level. Somewhere in there will be a specification of the exact URL of the page that the plugin looks for shares for. With your current setup, it will be showing the new URL, which is what you want to change. You will need to change this to the old URL of the blog post, for each blog post you want to save. There’s no easy way to do this on a site-wide basis, because if you change everything to reference your old URL, your new URL won’t work for your new posts. It’s all a bit of a mess, you see.
The fact that you have to do this manually is going to make it not worthwhile for a lot of your old posts. Why bother recovering the shares for a post that only had a dozen shares? I would recommend only doing this on old posts that have a large number of shares, both to cut down on the amount of work you have to do, and because it’s only in the critical mass that the shares have any value.
It’s worth noting here that this code change will effectively freeze your old share count. If a user shares your new URL, it won’t increase the share count for the old post, because the old post only recovers shares from the old URL. They would have to share the old URL, which the button should do, but not a direct copy and paste or manual share. This means if your old posts were gaining any shares, that gain should slow down.
You will also have to make triply sure that your old URLs redirect to your new URLs, so that anyone clicking on one of your old links via social media is delivered to your new page, where they can see the old shares.
Frankly, it’s all quite a lot of work and, much with the previous option, I don’t think it’s necessarily worth it. Again, it’s probably better to just blank out the old share buttons, and do some heavy thinking to decide whether or not you want share counts moving forward, knowing the hassle they can cause down the line. How much is that social proof worth to you, versus the hoops you have to jump through to get it?
A few social sharing button plugins have an interesting little option you can make use of here, though you may need to find cached versions of your page, or make a live version of the old URLs temporarily so you can implement it, and it may take you a lot of work depending on how large your site is and how many social media buttons you have.
Essentially, what I’m offering you here is a way to fake your share counts. Some plugins allow you to manually input a number that will display as the share count. Some other plugins don’t explicitly allow you to do it, but don’t hide the display number and allow you to edit it in a way you want.
Or, as another option, you can hire a developer or flex your own development muscles to create something that looks and acts like your current social sharing plugin, but is made up of static code and CSS to make it look right.
The end result, regardless of which method you use, is to manually set the number you want to appear on your social share count for your old posts. To that end, you will need to be able to see what the old share counts were, so you can copy them over. You can, of course, simply make up the numbers, but that leads to the temptation of making them inflated, and that’s pretty easy to spot out. So, be careful with this method, so you don’t arouse suspicion.
All of the above options deal with recovering the shares of the old posts, but what about new posts going forward? Well, thankfully, you don’t need to do anything but make sure you’re using the correct URLs for the new posts on the social sharing plugin you’ve chosen to use. This should work relatively without issue, though sometimes if you’re tinkering with plugin code you might run into an issue.
This other method can also help your old posts, if you’re willing to put in a little work. If your old posts had a relatively low number of shares, you can pretty easily replace them. Just give your old posts a new round of promotion with your hopefully larger audience than you had when they were initially published. You should be growing consistently, eh?
A good solid marketing push can give you more shares than you had before. It’s also what you’re going to need to do to your new posts to keep the traffic flowing, and to keep share counts up across the new posts you publish. This is essential for minimizing the impact of Google sorting out what they know about your site and how they’re reacting to a URL change. Until things settle, you’ll welcome all the help you can get.
James is a content marketing professional who enjoys writing useful content for bloggers. He’s a contributing writer at Forbes, Entrepreneur, Inc, and Business Insider.