views:

46

answers:

2

I have a classifieds website.

The index.html has a form:

     <form action="php_page" target="iframe" etc...>

The iframe displays the results, and the php_page builds the results for the iframe. Basically the php_page builds a table containing the results from a mysql db, and outputs it.

My problem is that this doesn't get indexed by google.

How can I solve this?

The reason I used an Iframe in the first place was to avoid page-reloading when hitting submit.

Ajax couldn't be used due to various reasons I wont go into here.

Any ideas what to do?

Thanks

UPDATE:

I have a sitemap with URLS to all the classifieds also, but I don't think this guarantees google to spider those URLS.

A: 

There is no way to make any webspider fill out and submit forms.

Workaround: Every night, create a dump of the database and save the HTML to a file. Create a link from index.html to that file. Use CSS classes to make the link invisible. This way, Google will pick it up but users won't see it.

Aaron Digulla
The google spider is clever enough to know when a link is invisible. I think there is a strong chance that would be treated as a 'black hat' technique.
DanSingerman
Hmmm... I see what you mean. Still I think that my approach is a good start.
Aaron Digulla
+3  A: 

Trying to make the google spider crawl the results of a search form is not really the right approach.

Assuming you want google.com users to find your classifieds ads by searching google, the best approach is to create a set of static html pages from the ads, and link them (not invisibly) from elsewhere on your site (probably best from the home page - but such a link can be in a footer or something else unobtrusive)

They can also be linked to from your sitemap XML (you do have a sitemap XML file don't you?)

Note: the <iframe> doesn't really come into this. Or Ajax.

DanSingerman
I do have a sitemap offcourse. So you are saying I could build up a "catalogue" of all ads on the page, and that way have links to all classifieds manually as well? Btw, check my update.
Camran
Absolutely..***(padding chars because SO makes me do that...)
DanSingerman
Sounds good, I might just do that. Also, came to think of it, this way I can also make my website work for users with js disabled (as my form uses js to work mainly). Thanks!
Camran
Re the update: If the page is only in the sitemap, but not otherwise spiderable, the Google spider may well ignore it. Best to have both routes to your ads available.
DanSingerman
Re the js-disabled thing: yes that is best practice. And the Google spider loves best practice. If you make a site that is progressively enhanced or degrades gracefully in such a way as it works in the most limited browsers, chances are the google spider will love you for it.
DanSingerman