Question

I put sharethis on my site, and if I go to the site andrewwelch.info without the www, then the shares are different from if I go to www.andrewwelch.info. How can I make sure that this doesn't happen?

Was it helpful?

Solution

ShareThis is rendered inside an IFRAME, and will use the parent frame's URL to determine the page someone is sharing.

You can add span tags with a st_url attribute to specify a canonical URL to use for a given page. An example is:

<span class="st_sharethis" st_url="http://sharethis.com" st_title="Sharing is great!"></span>

See here for more details.

As a side note: To improve your search engine rankings you should ensure your site doesn't present two different versions of each page. Search engines may reduce the relevancy of your site in results if this is the case. For example, the content of the following pages (and every other page on your site) are the same:

You need to fix this by choosing whether you want the "www" or not, then using one of the following methods:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top