Create Better SEO By Removing Stop Words

Search engines will not index common words this is so it can save time on both crawling and indexing. There are so many words which are always used it's a waste of time to index them.

Words such as

  • a
  • and
  • her
  • him
  • how
  • is
  • isn't
  • thanks
  • I
  • make
  • want

These words are known as SEO Stop words, as these words are not indexed is there any reason for them to be included in your URL.

If you use WordPress your post will automatically create the URL slug for your post, therefore we can add a function to stop your WordPress blog from having these stop words in your URL.

Add the following code snippet to your functions.php file to stop your URLs from including these words.

add_filter('sanitize_title', 'remove_stop_words');

function remove_stop_words($slug) {    

if (!is_admin()) return $slug;    

$slug = explode('-', $slug);    

foreach ($slug as $k => $word) {
        // List of stop words comma separated
	$keys = explode( ',', "a,about,above,after,again,against,all,am,an,and,any,are,aren't,as,at,be,because,been,before,being,below,between,both,but,by,can't,cannot,could,couldn't,did,didn't,do,does,doesn't,doing,don't,down,during,each,few,for,from,further,had,hadn't,has,hasn't,have,haven't,having,he,he'd,he'll,he's,her,here,here's,hers,herself,him,himself,his,how,how's,i,i'd,i'll,i'm,i've,if,in,into,is,isn't,it,it's,its,itself,let's,me,more,most,mustn't,my,myself,no,nor,not,of,off,on,once,only,or,other,ought,our,ours,ourselves,out,over,own,same,shan't,she,she'd,she'll,she's,should,shouldn't,so,some,such,than,that,that's,the,their,theirs,them,themselves,then,there,there's,these,they,they'd,they'll,they're,they've,this,those,through,to,too,under,until,up,very,was,wasn't,we,we'd,we'll,we're,we've,were,weren't,what,what's,when,when's,where,where's,which,while,who,who's,whom,why,why's,with,won't,would,wouldn't,you,you'd,you'll,you're,you've,your,yours,yourself,yourselves");		

        foreach ($keys as $l => $wordfalse) {			
              if ($word==$wordfalse) {				

return implode('-', $slug);}

To get a full list of stop words view this page.

Back to top ^

Join Paulund

  • Get access to 100s of premium tutorials and downloadable content
  • Members content consists of Premium WordPress plugins, CSS packages, jQuery packages, tutorial demo files and templates for 100s of web development tutorials
  • In-depth development tutorials
  • Priority tutorial requests
  • Priority email development support
  • No ads

Here at Paulund you'll find Web Development tutorials and snippets focusing mainly on PHP, WordPress and CSS. Members will get access to premium tutorials that go into more detail about development with these languages. You will also get access to downloadable premium content based on the tutorial.

Join Paulund

Leave a Reply

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