ColdFusion Muse

Coding for Search engines - URL madness

Mark Kruger June 9, 2005 5:43 PM Content Management Comments (3)

We are not search engine specialists by any means. Most of our customers have applications that are either internal, consist of business to client tools, or productivity tools for management. I recently received a few tips on content indexing however - and a couple of them are very cool and added to my knowledge on the subject. I went did some googling to find out if these 2 tips are common practice and indeed they are. I just wasn't paying attention.

GET versus POST on search forms.

While I have heard of this before I never really "got it". I have always favored POST instead of GET - figuring if you are using a FORM it's a post after all. Most of the form data we work with is internal to a company so we don't want it indexed anyway. For a search tool however, I now see that GET makes perfect sense. Why? Because it allows a SE to index pages as if they were unique - just off of a URL. If I have a search form at http://www.mydomain.com/search.cfm that uses a POST request to itself (for example) and displays a list of results - the form itself is all that I can index. If, however, I use a get request, I can index http://www.mydomain.com/search.cfm?q=product+description. To the engine that will have a unique set of results and be indexable as a page - very cool. I an now monitor my search engine for the most popular searches and publish a separate page with a bunch of links exactly like that. I really liked that idea.

non-functional data in links

This one is tricky and it should be a boon to all of you CF coders out there who are like me - fully functional and ascetically challenged. Let's say I have an ecommerce site with a catalog page. Typically my links look like ...product.cfm?prod_id=44. I like it. I don't pass any more data than I need to. I've often been on sites where the link includes all kinds of data - the category, product name, manufacturer etc. That's pretty messy (I would think to myself). Don't they know they don't "need" all of that stuff to get the data?

Well it turns out the emperor has no clothes. I never realized it before, but the link data doesn't just get you where you are going - it also says something ABOUT the link - it's additional (meta) data that helps a search engine categorize the link. That's why an ecommerce site might put the category in the link data - to make it more accessible and indexable. So you can teach an old dog new tricks I guess :)

  • Share:

3 Comments

  • JesterXL's Gravatar
    Posted By
    JesterXL | 6/9/05 4:30 PM
  • Mark Kruger's Gravatar
    Posted By
    Mark Kruger | 6/9/05 4:50 PM
    Yeah - I read Christians blog during the hullabaloo about the Google web accelerator. In fact, my comment to the SE optimization folks was - as long as we were working with the "search" form then I was ok with it. Search is a "get" with a dynamic return. I think that fits into the paradigm all right.

    I especially liked Christians explanation at the bottom, "To put it in basic terms, a GET should never perform an action that will have negative consequences if requested randomly and repeatedly." That sums it up pretty nicely.

    His comments on "PUT" and "DELETE" tickled my memory as well. I had forgotten there ever where any other verbs than GET and POST (ha).
  • Nate's Gravatar
    Posted By
    Nate | 3/28/07 11:08 AM
    Rather than rewrite all your Coldfusion code to make your links have descriptive words in them, can you do something like an .htaccess file with a mod rewrite? Is there an equivalents to this on a Windows platform?