Turk Hit Box

Turk Hit Box

Ramblings of a Turkish Internet Mogul

Top Pages

Recent Articles

Pages

Make Searches on Your Wordpress Indexable

You have probably met some of the spam sites that replicate google searches for lots and lots of google indexed pages. Believe me, they do receive a lot of hits, because pages they serve are very relevant. Indexing searches is a known for good amount of time, but what we are going to do is we will make google index our site-wide searches not google search engine result pages (serps). And at the end, we will be generating a lot of traffic from google.

Make Searches on Your Wordpress Indexable
First we need to download the Search Meter Wordpress Plugin. It basically keeps track of what your visitors are searching for. After installing it, you can show the latest or most popular searches on your sidebar using:

  • <?php sm_list_recent_searches(’ ‘,’ ‘,’10′) ?>
  • <?php sm_list_popular_searches(’ ‘,’ ‘,’10′) ?>

The first and second empty brackets represent what you want to place in front of and after every search term (html code like <li> and </li>) The number at the end is the number of results you want your visitors to see.

Now we need to edit it:

On line 101 and 120 of the plugin file, replace

<a href=”‘. get_settings(’home’) . ‘/search/’ . urlencode($result->terms) . ‘”>

with

<a href=”‘. get_settings(’home’) . ‘/search/’ . urlencode($result->terms) . ‘.html”>

this will show your searches as html documents, and I don’t have to say how much Google loves html documents, do I?

Now, the plugin will list the searches as html documents, but they will return 404 errors since we have not yet configured Wordpress internal files. The .htaccess rewrite attributes are written in a file called rewrite.php inside your wordpress/wp-includes/ folder. Open that file and go to line 408, and replace

$this->search_structure = $this->root . $this->search_base . ‘/%search%’;

with

$this->search_structure = $this->root . $this->search_base . ‘/%search%.html’;

This will prevent Wordpress from returning 404 errors. Now wait for google to crawl through your searches. You will be amazed at how much traffic your wordpress searches can bring. There are also other possibilities that I won’t get into, but I hope you like it.

PS: this will never get you banned or put you in google sandbox. Overall, this is acceptable according to Google Guidelines.

Posted in: Gray Hat SEO

15 Responses


Jon Waraas on 10.09.2007 at 9:25 am

line 101 and 120 of what file?

Turk Hit Box on 10.09.2007 at 9:46 am

Hi Jon,
I was referring to the plugin file. Let me fix that.

Nick on 10.11.2007 at 1:06 am

thanks for the great plug in idea

Reader Tips: 14 October 2007 on 10.14.2007 at 11:11 pm

[…] Indexing Blog Searchs: This post explains how you can make the searches performed on your blog indexed by Google. I am not sure how safe this it, but the concept is interesting. […]

Plepco on 10.17.2007 at 4:59 am

Hmmm I am not sure if something's missing or what: when I hover over the keywords, there is no .html extension. If I manually type in the keyword with .html it does not show up. Are .html files actually ever created??

Turk Hit Box on 10.18.2007 at 2:06 pm

No they do not actually get created. Its like your wordpress categories like domain.com/category. The folder category is not actually created on the server.

Darth Guru on 10.22.2007 at 7:48 am

Your tips hot man, I love it.
I dugg ya couple times, def be back to read again.

:)

Darth Guru

Nick on 10.26.2007 at 2:50 am

Thanks for the tips, interesting idea…
<a href="http://www.clickfornick.com">Click for Nick… Why Not?</a>

Rob on 11.16.2007 at 10:43 pm

Interesting idea but what about this from Google's Webmaster Guidelines - Use robots.txt to prevent crawling of search results pages or other
auto-generated pages that don't add much value for users coming from search engines.

TheAnand on 11.19.2007 at 1:35 pm

great tips for some good traffic. I was wondering the other day about this since I have seen some sites do this. just stumbled it too ;) enjoy the traffic!

Kamil Wojcicki on 12.19.2007 at 4:48 pm

When you say "Google loves html documents" would changing my permalink structure from: /%postname%-p%post_id%/ to /%postname%-p%post_id%.html seriously make a difference?

Vesselin on 12.19.2007 at 11:24 pm

Hey,

This is a nice tip, I'll definitely try it. Thanks!

I only have one question - how will Google index your searches if the only way to see them is through the admin panel, which Google has no access to?

Regards,
Vess

Mike on 04.01.2008 at 3:19 am

I got this error:

Parse error: syntax error, unexpected ‘%’ in /home/website/public_html/blog/wp-includes/rewrite.php on line 444

Using WordPress v2.5

Mike on 04.01.2008 at 5:42 am

Seems to work well now.

Also, as a tip for others, I worked myself up in a frenzy trying to stick that php code in a php executable widget. Don’t bother. SearchMeter includes a Recent Searches widget.

Ken on 07.02.2008 at 9:24 am

Not Working at all. Error in 444.
And it don’t really trigger any 404 error when you have change the search-meter.php code. Any one have clue? IT seem I got the same problem with Mike.

Please don’t help people half ass.

Regard.

Leave a Reply