WordPress Tip: Link Author Comments to the Home Page
After almost three years of blogging here at Perishable Press, I had an epiphany about my author comment links. Way back when, after installing WordPress in a subdirectory called /press/
, without really thinking too much about it, I decided to set the URL for the Admin User’s “Website” as this:
https://perishablepress.com/press/
After all, it seemed to make sense at the time, plus it really didn’t seem to matter.. I mean think about it. Unless I instruct my WordPress theme to actually display user profile information, surely nobody was going to see my personal website URL. So it really doesn’t matter, right..?
Wrong.
Three years later, I finally realize that it does matter. The URL that you enter as your profile’s website address is the URL that will be used for every author commentator link on your site. Yes, I know what you’re probably thinking, “what an idiot! I thought everybody knew that!” Well, no, obviously not everybody. It may have occurred to me momentarily or subconsciously at some point along the way, but it wasn’t until just a few days ago that the light bulb finally flashed.
Big Deal
So what’s the big deal? First and foremost, one of the most highly visible and prevalent links to your site comes from your own author commentator links. These links are used to represent your site for every one of your own comments. Other commentators and visitors recognize the link, note the location, and possibly use it when linking back to your site. Thus, it is important to represent your site by linking to the optimal URL in your author commentator links.
Other reasons why you want to select an optimal URL for your User Profile’s website information involves search engine optimization. Having hundreds or thousands of commentator links pointing at the wrong URL is like pouring gallons of powerful link juice right down the drain.
Regardless of whether or not Google et al actually count repeat internal links, it is important to emphasize the page that you want as your site’s main page. So, for example, in my case, I was using the subdirectory URL for all of my dofollow commentator links, and then scratching my head wondering why it kept landing a higher page rank than my my site’s home page!
Search and replace
Incidentally, if you now are planning to update your User-Profile’s website URL, keep in mind that the change will affect only new author comments. The previous site URL has already been associated with all of your previous comments in the WordPress database. Fortunately, it is easy to update that information with a little SQL magic:
UPDATE `wp_comments` SET `comment_author_url` = REPLACE( comment_author_url, 'http://domain.tld/subdomain', 'http://domain.tld/' ) ;
Simply replace http://domain.tld/subdomain
and http://domain.tld/
with your information and off you go! After executing that query, all of your author commentator links will be pointing to the newly specified URL. Coupled with the updated information in your User Profile, you’re all set. Nothing could be easier, but even so, remember to backup your database before making any changes. For more information on this technique, check out my article on how to update your email address in the WordPress database. Highly recommended ;)
2 responses to “WordPress Tip: Link Author Comments to the Home Page”
Thanks for the WordPress tip! Just did it on my blog.
I’m sold :)) +1