SERPland Flugverkehr/Airtraffic Zürich – Auto Direktimport Dänemark – Disneyland Paris – Legoland Deutschland

2Nov/060

WordPress PingPost plugin: Avoiding duplicate content


The PINGPOST plugin for WordPress is absolutely great.
Just install it (simply copy one php page to your wordpress plugins directory) and set your options on the options dialogue in wordpress).
All done. It works perfectly. But there a problem exists when you've changed your WordPress permalink structure.

The WordPress default permalink structure is: http://domainname/?p=123

When you're using this permalink structure, everything is fine with pingpost. Stop reading this post, exit and drink coffee.

But when you've changed the permalink structure, Google probably will not like you anymore. The pingpost pluging links to your posts with :

http://domainname/?p=123

But maybe you have changed permalink structure to

http://domainname/2006/11/02/sample-post/
or to
http://domainname/archives/123.html

(as I personally did)

So Google and other search engines will interpret following URL as duplicate content:

http://domainname/archives/123.html
http://domainname/?p=123

To solve this duplicate content problem, I made a pretty small change to my pingpost.php file.
Just change

get_option('siteurl') . '/?p=' . $post_ID

to

the_permalink()

in the Ping_Post_Com() function.
Here you can see my Ping_Post_Com() sample:

function Ping_Post_Com($post_ID) {
if ($_POST['catid'] > 0) {
$the_post = get_post($post_ID);
$_POST['USER'] = get_option('pp_USER');
$_POST['PASS'] = md5(get_option('pp_PASS'));
$_POST['title'] = $the_post->post_title;
$_POST['introtext'] = $the_post->post_content;
$_POST['from_bot'] = 'PLUGIN';
$_POST['urls'] = the_permalink() /*get_option('siteurl') . '/?p=' . $post_ID */ ;
$_POST['option'] = 'com_content';
$_POST['task'] = 'add_story';
$output1=HTTP_Post("http://www.pingpost.com/index.php",$_POST);
}
#echo "hey $output1"; exit;
}

With this little change, the links on the PostPing site will look the same as on your page and the same as the search engines have indexed your site. So search enginges will not interpret your pages as duplicate content.

Related Posts:

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.