26.Apr.2008 at 8:52 pm | Sunny
SEO Tip Open Comment Author URL in new Window
For good SEO, it is preferential to open your comment authors URI in a new page. Why you might ask? Google and other search engines track sites you visit, they can tell what that site contains (obviously), how long you stayed there and where you went next. The intended use of this information is to find if the sites you visited were relevant to your search keyword and/or if all the sites you visit are related. That could also work against you if your site get a lot of spammers commenting on it. Here’s how.
Let’s say you get a comment on your site that look legit, so you want to see who this Mr. X is, you click the author name and visit his site to find youself in a very spammy site. Your natural instinct at that point is to hit the back button on your browser.
Everything looks fine thus far. But let’s look at it from Googlebots stand point.
- You are on your clean site
- You go to a spammy site
- Then back to your clean site
So are these sites related? Even if the obvious answer to you is no, how can the machine distinguish it? If we play that scenario such that you closed the spammy sites window to exit it, you will not risk hitting the back button to return to your site.
Now you may ask, how often does that happen? The answer to that question depends on how often you get spam comments that get past Akismet.
Since these are the days of spam and splogs, you are no longer sure if the person commenting is doing it for sincere reasons or just spamming you. Nonetheless, if you must, you are better off visiting their site in a new window.
WordPress comments have “nofollow” tag to any link in comments by default, so the link love part is take care of. Now to make the author link pop-up into a new window, you need to be willing to edit a few lines in your WordPress core file comment-template.php within the wp-includes directory. If you are not comfortable touching the core file, I suggest you make a copy of the same within the wp-includes directory as a backup just in case you mess up.
The edit is accomplished via file manager, FTP or webFTP, if you do not have access to the core files of your WordPress install, you are probably on a hosted service such as WordPress.com, in which case you should seriously consider moving to a self-hosted WordPress. In any case, here are the steps:
- Open file manager/FTP/WebFTP
- Log into server and go to the WordPress install
- The root should have three folders, wp-admin, wp-content, and wp-includes
- Open wp-includes
- Look for a file called comment-template.php and open it in a text editor like Notepad
- Now use a search/find function (Ctrl+f in FF or IE) and look for:
- <a href=’$url’ rel=’external nofollow’>$author</a>
- Add to that line (before href):
- target=’_blank’
- So your edited tag should look like this:
- <a target=’_blank’ href=’$url’ rel=’external nofollow’>$author</a>
That is it, now clear you cache (if you have WP Cache active) and test it on any of your earlier post with comments. If you think pop-up windows are uncool, remember that spams are bad news and being associated with it can not be any better. If yours site needs strict XHTML validation, I suggest you try using Javascript to accomplish the same.





1. Robin | April 27, 2008 #
I follow the steps one by one, but then the comment author’s link strangely changed into post page. Did i miss something?