Shared post is going to local host

dilip.rollwala May 05, 2012 06:26AM EDT

Hi,

I have added addthis.com code to my website. it posts in twitter and facebook but the problem is when we click on link from the facebook/twiter it goes to localhost url.
i.e. My URL is http://www.theartshouse.com.sg/Programmes/EventPage.aspx?EventID=1083 when i share to twitter and open it from the twiter it open http://www.localhost/Programmes/EventPage.aspx?EventID=1083#.T6T_EmaiDCU.twitter link. Please see the domain name. problem is there only.

Below is the code i have put in my side.
<div class="addthis_toolbox addthis_default_style addthis_16x16_style">
<a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a><a class="addthis_button_compact">
</a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4edc32815d3a3974"></script>

Please let me know what i can do for this.

Thanks in advance.

1 Community Answers

Paul May 08, 2012 02:57PM EDT

The problem is that your canonical link is set to the localhost URL, which is what AddThis will use to determine the URL to share. To fix this, change this:

<link href="http://www.localhost/Programmes/EventPage.aspx?EventID=1083" rel="canonical" />

To this:

<link href="http://www.theartshouse.com.sg/Programmes/EventPage.aspx?EventID=1083" rel="canonical" />


Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Still need help?


General Topics

 

Developers