Different Like-Buttons in “www.example.com/” and “www.example.com/Default.aspx”
-
27-10-2019 - |
Question
I have a "Like" and a "+1" Button on my Startpage.
But when you enter "www.example.com" you get different like-stats and +1-stats als when you get "www.example.com/Default.aspx".
But in the background the site (of course) is the same.
How to redirect "www.example.com" to "www.example.com/Default.aspx" without a neverending circle-reference?
Solution
For your Facebook like and Google +1 button, be explicit in specifying the url that you want to collect likes on.
Google +1:
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone href="http://www.site.com></g:plusone>
Faceboook like:
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=189736484409061&xfbml=1"></script>
<fb:like href="http://www.site.com"></fb:like>
Also, you should look into doing 301 redirects from /default.aspx to / so search engines don't think you are having duplicate content.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow