5 Powerful WordPress Hacks to Improve SEO Ranking

By -

Traffic is all about SEO Optimizing and Rankings. This post includes the most powerful wordpress hacks which will help you gaining top positions in Search Engines and Improve SEO Rankings. WordPress is already 60% SEO optimized CMS but when it comes to rankings, then you need to do external mindsets for ranking on the top in the Search Engines.

These WordPress Snippets, Tricks are must for every WordPress user, if you want to rank better. These snippets helps Search Engine bots, like Google bots to identify your content well and crawl the pages faster with effectiveness. What we will be doing to improve SEO is just editing some files, mainly the most powerful file .htaccess to get the most out of your blog. So, lets get started.

WordPress Hacks to Improve SEO

5 Powerful WordPress Hacks to Improve SEO Ranking

Redirect 404 Pages

< IfModule mod_alias.c >
RedirectMatch 301 ^/search/$ http://your-site.com/
RedirectMatch 301 ^/tag/$ http://your-site.com/
RedirectMatch 301 ^/category/$ http://your-site.com/
< /IfModule >

404 Error Pages are those Pages which are generated when there is no content on the page you have specified. The bad part of 404 pages is that, 404 Pages decreases the Pagerank of your blog making your site rankings ineffective. So, what we will be doing to Improve SEO is utilizing the WordPress Hack to redirect the 404 Error Pages to the Blog’s Homepage.

Automatically Remove Stop Words from URL

add_filter('sanitize_title', 'remove_short_words');
function remove_short_words($slug) {
if (!is_admin()) return $slug;
$slug = explode('-', $slug);
foreach ($slug as $k => $word) {
if (strlen($word) < 3) {
unset($slug[$k]);
}
}
return implode('-', $slug);
}

When you write a title for your blog post in WordPress, the permalink adjusts according to the title you wrote. It is considered that we should not use Stop Words like, for, the,is etc in the permalinks of blog posts. It improves SEO and also helps to expect the content from the URL only. So, to make the job automatically done, use the snippet to automatically remove stop words from permalink to Improve SEO.

Highlight Keywords in Search Results

function wps_highlight_results($text){
if(is_search()){
$sr = get_query_var('s');
$keys = explode(" ",$sr);
$text = preg_replace('/('.implode('|', $keys) .')/iu', '<strong>'.$sr.'</strong>', $text);
}
return $text;
}
add_filter('the_excerpt', 'wps_highlight_results');
add_filter('the_title', 'wps_highlight_results');

Use this snippet to highlight the Searched Words in the_excerpt and the_title of the searched results on your blog.

Rewrite Search Result Permalinks

function search_url_rewrite_rule() {
if ( is_search() && !empty($_GET['s'])) {
wp_redirect(home_url("/search/") . urlencode(get_query_var('s')));
exit();
}
}
add_action('template_redirect', 'search_url_rewrite_rule');

This snippet helps you to rewrite the Search Results Permalink like “yourblog.com/search/searched-keyword“, ultimately its better than the default search permalinks, hence improves SEO.

Disallow Directories for Google Bots

User-agent: Googlebot
Allow: /?display=wide
Disallow: /wp-content/
Disallow: /trackback/
Disallow: /wp-admin/
Disallow: /feed/
Disallow: /index.php
Disallow: /*?
Disallow: /*.js$
Disallow: /*.inc$
Disallow: /*.css$
Disallow: */feed/
Disallow: */trackback/
Disallow: /link.php
Disallow: /gallery2
Disallow: /gallery2/
Disallow: /refer/
User-agent: Googlebot-Image
Disallow: /wp-includes/
User-agent: Mediapartners-Google*
Disallow:

Use this piece of snippet in your robots,txt file to prevent Gogole Bots to index undesired directories like wp-content, wp-includes etc.

We have a team of experts in graphics related stuff, who bought this article up-to you.

20 Comments to 5 Powerful WordPress Hacks to Improve SEO Ranking

  1. To be honestly I haven’t optimized my blog for 404 pages error.Now I’m going to optimize 404 error pages in my blog :) Thanks for this technique.

  2. hello,

    did i miss where i should add these codes?

    sorry for that basic question!

    thanks again

  3. Hi DesignSkew.com,
    Thank you for this very useful information, and for share it!
    I have a very basic question as well. Where exactly do i have to put the snippets? You say in htaccess file and rest to be in functions.php, but “where exactly”, after what?
    Sorry for my low level, and thank you again for this wonderful article. ;-)

    • Its fine, I feel good to help newbies, exactly I can’t tell because it is different for different theme. But in most condition, you can try adding the snippets in the bottom of the functions.php file, and same for htaccess, in the bottom of the file.

      Also, don’t forget not to leave any blank line in the end of functions.php file.

  4. Hi!

    Your website is way too good. I enjoy the valuable data you deliver to your posts. I will save your blog page and look all over again in this article routinely.
    Also i hope your post will help me improve my website.

  5. Hey Mani,
    Modifying robots.txt file and disallowing affiliate links as well as directory would help us to get quick ranking.Premalink is also important, however during recent Google algorithm updates, I am using harsh agrawal’s tips of removing dates from blogpost will also be helpful for SEO.

    I have personally experienced it and removed dates from one of my blog to test the results. It helped me to recover 20% of my lost traffic and still I am trying new stuffs to recover my lost traffic on my blog.

    Thanks for the great article.
    Bhavesh Sondagar recently posted..How to Perform SEO Audit Using SEMrush SEO ToolMy Profile

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge
This blog uses premium CommentLuv which allows you to put your keywords with your name if you have had 5 approved comments. Use your Real Name and then @ your keywords (maximum of 3)