Removing more WordPress Meta tags

December 19, 2011

If you have a relatively new installation of wordpress you will notice there are a bunch of meta tags in the source that are not that common to see. “Which ones do I need?” I thought. Well since I was using a wordpress page to run code that would generate dynamic content for multiple urls I knew I needed to get rid of the ones showing the actual page URL.

EditURI and Windows Live Writer

<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://yoursite.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://yoursite.com/wp-includes/wlwmanifest.xml" />

EditURI will help client software discover your site. “wlwmanifest” sets up support for Windows Live Writer tagging. This maybe valuable to some of us and it didn’t really hurt my case so I left it. If you’d like to remove them, add these lines of code to your functions.php file in your theme:

remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'rsd_link');

index, prev, next

<link rel='index' title='indextitle' href='http://yoursite.com/' />
<link rel='prev' title='prev_page_title' href='http://yoursite.com/prev/' />
<link rel='next' title='next_page_title' href='http://yoursite.com/next/' />

These are here to help explain to search engines how your page hierarchy is displayed. If you are running a straight up blog like ServerSideGuy.com, then this will probably work. But it seems like it trips up on pages. You should have a good sitemap.xml file with good prioritization so I really didn’t see the value here. I left the index as that will always be the same.

remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );

Note: Older wordpress versions use ‘adjacent_posts_rel_link’ as the action

Generator
This one I would recommend every wordpress user in removing. It’s there to tell search engines that this is a wordpress site. But this is only used in data gathering so WordPress can say they have X percent marketshare. Since it plainly displays the version of wordpress, I say it needs to go. You never know when the next exploit will be found and if its in the version you are using do you really want hackers to see that?

<meta name="generator" content="WordPress 3.2.1" />

Remove this with:

remove_action( 'wp_head', 'wp_generator'); 

Stay in Touch!

Subscribe to our newsletter.

Solutions Architecture

browse through our blog articles

Blog Archive