Translate This Page
- Removes the Generator/WordPress Version number from the head section for security reasons. You don’t want your WordPress version being visible because hackers can use it to attack your site. Even if you keep your site up to date, it still could be vulnerable to zero-day exploits.
- Removes Version numbers from CSS and JS links in the HEAD for the same security reasons you hide WordPress version. Will also improve site loading speed because removing version numbers from the CSS and JS links will allow browsers to properly cache these files, as well as helping your site code to validate.
- Removes junk code from the head section of your site: RSD link, Windows Live Writer Manifest link, WordPress Shortlinks, Adjacent Posts links (REL = PREV/NEXT) as all are unnecessary, hurt your SEO and clutter your site code.
- Fix the “Read more” link so it displays the entire post when you click, not just the part after the “#more”.
Why Do I Need RS Head Cleaner Plus?
Here’s a more detailed explanation of what the plugin does.
The code for the WordPress version number is in the HEAD section of your page and looks like this:
<meta name='generator' content='WordPress 2.7' />
Showing the WordPress version in your site code exposes your site to hackers. Many exploits are version-specific, and even if you keep you blog up to date, there are zero-day exploits that occur before a new version can be released to patch the problem. Hackers run automated programs call “bots” to scour sites looking for this line of code with WordPress versions, and when they find one that matches the version of the exploit they are looking to launch, they send another bot to those sites to launch the attack.
That’s why it’s important to remove the WordPress version number from your site. (Obviously you need to secure your site using more than just this one method.)
Once you activate this plugin, the WordPress version will disappear from your site code.
By default WordPress inserts version numbers into the CSS links in the HEAD section of your page and looks like this:
<link rel='stylesheet' id='example-css' href='http://www.yourblog.com/wp-includes/css/example-css.css?ver=3.5.1' type='text/css' media='all' />
Showing the WordPress version in your CSS and JS links again exposes your site to hackers. For the same reasons we remove the WordPress Generator, you want to remove them from here.
But, that’s not all. Having the version numbers appended to the link keeps browsers from caching the CSS and JS files. If you want your site to run at its fastest, one aspect of that is using caching properly. Removing these version numbers will now allow browsers to cache those files.
One last thing…having version numbers appended to the CSS and JS links causes sites not to validate. So in order to get your site code to validate 100%, you will want to remove those.
Once you activate this plugin, this issue will be fixed and the resulting code will look like this:
<link rel='stylesheet' id='example-css' href='http://www.yourblog.com/wp-includes/css/example-css.css' type='text/css' media='all' />
This plugin cleans up the HEAD section of your site. For those of you not familiar, that’s the HTML code located between the <HEAD> and </HEAD> tags. WordPress inserts code that can hurt your SEO and site security. This plugin will automatically remove these lines of junk code for you. I’ll explain in a bit more detail.
1 — Remove the The RSD Link
RSD stand for Really Simple Discovery. In a nutshell, it helps remote client software find the info it needs to read and edit the blog. WordPress inserts the following code:
<link rel='EditURI' type='application/rsd+xml' title='RSD' href='http://www.yourblog.com/xmlrpc.php?rsd' />
The RSD link is only needed if you use remote publishing to your blog. If you only edit your blog through a browser (which is true for most people) then it is more secure to remove this from the header. As a general rule and best practice, it’s always better to have clean code and remove unused code from a site, for efficiency, security and SEO.
2 — The Windows Live Writer Manifest Link
<link rel='wlwmanifest' type='application/wlwmanifest+xml' href='http://www.yourblog.com/wp-includes/wlwmanifest.xml' />
This is a similar deal to RSD. The bottom line is, if you’re not using Windows Live Writer, remove the WLW Manifest link from the HEAD section of your site code to improve security and SEO.
3 — Remove WordPress Shortlinks from the HEAD and HTTP Headers
Shortlinks is a protocol you can use to specified shortened URL’s for each page in your site code. WordPress has provided its own URL-shortening service. WordPress inserts code in your header that provide a link to the “shortened” URL:
<link rel='shortlink' href='http://www.yourblog.com/?p=1257' />
If you don’t actually request a shortlink when you write your post/page, it will insert the raw unshortened URL into your page. Ouch. If you notice, it matches the default URL structure before you even setup permalinks in the WordPress settings.
Why even have WordPress create clean, SEO-friendly permalinks, if it’s going to ignore your settings and insert junk like this into your site? Not cool. To be clear, these are NOT SEO-friendly URL’s. It’s one thing to use these for Twitter or affiliate links, but its bad idea to include these in your site code. It is not recommended under any circumstance. These should be removed no matter what as they will only hurt your SEO in a number of ways.
That’s not the only place where WordPress places shortlinks. They are also inserted into the HTTP headers. (These are served invisibly to the browser before the page loads.) Again, ouch. See what it looks like:
Link: <http://www.yourblog.com/?p=1257> rel=shortlink
The thing is, this is all according to shortlinks protocol, but WordPress’ implementation is incorrect. If the user has not specifically chosen to create shortlinks, there should not be default “shortlinks” inserted into the site — there should be none at all — and especially not ones that are in the format shown, with SEO-unfriendly URLs, and which expose post ID’s. That’s ok though, this plugin will fix it for you.
4 — Adjacent Posts Links: REL=”PREV” and REL=”NEXT”
WordPress Adjacent links were meant to be an aid in helping with canonical issues with paginated posts on a blog. Unfortunately WordPress’ implementation is incorrect and inserts these on ALL posts/pages, even ones that are not paginated:
<link rel='prev' title='Previous Page' href='http://www.yourblog.com/previous-page/' />
<link rel='next' title='Next Page' href='http://www.yourblog.com/next-page/' />
What this does is create a mess, and hurt your SEO. I’ve seen it list pages in these links that were completely unrelated just because they had sequential post numbers in WordPress. I highly recommended turning off the WordPress’ default implementation (which this plugin will do for you).
These days it is important for a number of reasons to speed up your site as much as possible. It even affects your SEO and advertising costs:
- Usability — Usability and user-friendliness always needs to be the first concern on your website. It’s important to speed up your page because if you have a slow site, it will eventually drive people away. Make your site faster, and improve user engagement on your site.
- AdWords Quality Score — When you advertise on AdWords, Google assigns a quality score for ad. This affects your costs for advertising if you have a poorer score. Page speed is one of the factors that affects your quality score.
- To improve page load speed when Contact Form 7 is installed, the plugin will only include the JS and CSS for Contact Form 7 on pages that actually use its forms. (It tests the page content for the CF7 shortcode…if none are detected, then the CSS & JS aren’t included.)
All of this has been tested and verified with GTMetrix, which tests websites using Google PageSpeed and Yahoo YSlow, and shows the scores. Check it out for yourself…do a before and after test with your site and watch your Google PageSpeed and Yahoo YSlow Scores improve right before your eyes.
For more information, this is explained in more detail further down the page.
By default, on a WordPress site when a visitor sees an archive page with a list of posts (Home Page, Categories, Tags Archives, Date Archives, Search Results, etc.) and they click on the “Read more” link, it takes them to the point in the post where the more tag was inserted (
<!--more-->). This plugin fixes that issue, so when a visitor clicks the “Read more” link, it will display the entire post, for an improved user experience.
- It skips jquery files and other files that are known to need to stay in the head of the page.
- All properly enqueued WordPress CSS and JS files will be included…even theme files if they use the WordPress enqueue process. If the theme outputs the CSS and JS directly to HTML then they won’t be included.
- When the CSS files are combined, all image URL’s referenced in the CSS are corrected, since the CSS file will now be in a different location. Yeah, the plugin is that smart.
- The minified cache files will be stored in sub-directories of your wp-content folder: “/rshcp-cache/css/” and “/rshcp-cache/js/”. There will be a lot of files in these directories…that’s ok…these are the cache files. That means everything is working.
- There will be two versions of each page’s CSS and JS files…one with “min” in the name, and one with “raw”. The “min” file is what gets used on your page, and the “raw” file is uncompressed file kept to use as a reference by the plugin so it knows when the code has changed.
Page Speed Improvements: What Results Can You Expect?
Results will vary on every site. (I have to get that out of the way.) It’s going to depend on how optimized your site already is. But even optimized sites will get excellent results.
This plugin will improve these elements of your Google PageSpeed Score (and more):
- “Minify CSS”
- “Remove query strings from static resources”
It will also improve these elements of your Yahoo YSlow Score (and more):
- “Make fewer HTTP requests”
Real Before and After Examples from GTMetrix:
Google PageSpeed Before/After
Yahoo YSlow Before/After
It will also help improve several other elements of your Google PageSpeed and Yahoo YSlow scores, since many aspects of improving page load speed are related to these.
If you want to see the real difference it makes, go to GTMetrix and run a before and after comparison. Deactivate the plugin and run your “Before” report and print it or save as a PDF, and then reactivate it and run your “After” report and print it or save as a PDF. (This works best if you disable caching on your site and clear the file cache before you run these.) Then compare your two reports to see the difference.
When you run your reports, pay attention to the elements mention in the Before/After examples above, and also pay attention to:
- “Page load time”
- “Total Page size”
- “Total number of requests”
These improvements in page loading speed may also help your website’s SEO, in particular your Google rankings, because website speed is a factor in ranking now. I suspect it will become an even more important part of the ranking algorithm as time goes on.
For Best Results
If you REALLY want your site speed to increase, use this in combination with WP Super Cache. Use the “mod_rewrite” method, and then the “Preload” option to preload the the pages of your site. What this will do is go through your site, and create a cached version of every page before anyone ever visits the page, so it will be super fast on the first visit. This will also ensure that all the cache files for RS Head Cleaner Plus are created before anyone visits.
Make sure when you install this plugin and activate it, if you ARE using caching software, have your plugin delete the file cache first thing, otherwise the new improvements won’t go into effect until it refreshes the cache.
Option 1: Install the plugin directly through the WordPress Admin Dashboard (Recommended)
- Go to Plugins -> Add New.
- Type RS Head Cleaner Plus into the Search box, and click Search Plugins.
- When the results are displayed, click Install Now.
- When it says the plugin has successfully installed, click Activate Plugin to activate the plugin (or you can do this on the Plugins page).
Option 2: Install .zip file through WordPress Admin Dashboard
- Go to Plugins -> Add New -> Upload.
- Click Choose File and find
rs-head-cleaner.zipon your computer’s hard drive.
- Click Install Now.
- Click Activate Plugin to activate the plugin (or you can do this on the Plugins page).
Option 3: Install .zip file through an FTP Client (Recommended for Advanced Users Only)
- After downloading, unzip file and use an FTP client to upload the enclosed
rs-head-cleanerdirectory to your WordPress plugins directory (usually
/wp-content/plugins/) on your web server.
- Go to your Plugins page in the WordPress Admin Dashboard, and find this plugin in the list.
- Click Activate to activate the plugin.
Version 1.3.1, released 07/12/14
- Added additional security checks.
- Fixed a minor bug.
Version 1.3, released 07/03/14
Version 1.1.1, released 06/17/14
- Updated some features.
Version 22.214.171.124, released 04/28/14
- Fixed a bug that caused an error message on certain server configurations.
Version 126.96.36.199, released 04/13/14
- Added additional security checks.
Version 188.8.131.52, released 04/04/14
- Minor code improvements.
Version 184.108.40.206, released 03/26/14
- Added feature to remove version numbers from CSS and JS links in the HEAD.
Version 220.127.116.11, released 03/17/14
- Initial release.
Frequently Asked Questions
Q: Where are the options?
A: This plugin is fast, and lean…there are no options needed. You install it and it just works.
Q: Does this plugin have any known issues?
A: Just one that I know of.
Test this plugin out on your site before deciding if it will be the right solution for you. Normally I would create an options page to let you turn the JS-to-Footer feature off, but this plugin is all about speeding up your site, and that means minimal calls to the database, so unfortunately it would defeat the purpose of this plugin if I added the ability to change that.
In this case, use the RS Head Cleaner Lite Plugin.
Q: But I already have a Caching Plugin like WP Super Cache installed? Why do I need CSS and JS caching?
Q: What if I Don’t Want to Have My Page’s CSS Files Cached?
A: This plugin is built for speed. That’s why it doesn’t have an options page, because I didn’t want it to have any database calls, which would slow it down. After a certain amount of database calls, you lose any speed improvements. Amazon.com found that for every 100 milliseconds (1/10th of a second) their site slowed down, they lost 1% in sales. Ouch.
This new feature is integral to the plugin, so the caching isn’t a feature you want, then this plugin won’t be the right match for you. It’s designed for people that are very speed conscious, and want hardcore solutions.
If you need a version that doesn’t have the JS to Footer code, try RS Head Cleaner Lite:
Download RS Head Cleaner Lite Plugin (.zip)