Forum Moderators: open
I've been using CF for a while & have been through all the ups & downs related to Google.
The most important thing is never append CFID and/or CFTOKEN values to the urls. These are the equivalent of sessionId in php and will put a stop to any crawling of your site.
I've got sites that use a url structure of www.domain.com/index.cfm?pageId=123,456 and these seem fine with Google, however I prefer to remove the? and go for more "logical directory" style urls like www.domain.com/index.cfm/section/about_us/page/contact_us.
To do this & get everything after the index.cfm to behave like url variables you need to do a little trickery. The variables cgi.path_info and/or cgi.script_name will, in this case, return index.cfm/section/about_us/page/contact_us. From here you can loop over this string and pull your variables into the URL scope.
Here is the script I use (place somewhere where it will be run early in every request):
<cfset qStr = cgi.path_info> <!--- or <cfset qStr = cgi.script_name> --->
<cfloop from="2" to="#listlen(qStr,'/')#" index="i" step="2">
<cfset "url.#listgetat(qStr,i,'/')#" = listgetat(qStr,i+1,'/')>
</cfloop>
After this script has run I would have url.page = contact_us and url.section = about_us.
I originally set this up when I was under the impression that search engines hated "?". From my observations of sites with and without this set up I think it makes bugger all difference in that regard, but it looks much better from a users point of view.
One other note... if & when you put this in place you must use absolute paths for all your links and images/css/js references because although your web server will understand that its running index.cfm in the root directory your browser will think its calling a file in the "contact_us" directory.
Oh and one more... this will work on apache but it may take a little tinkering with your apache config.
don't use more than 2 URL variablesdon't use "id" as a URL variable name
A client of mine has a ColdFusion site with a CMS which generates page URLs along these lines
[abc.com...]
Whilst pages are indexed by Google and have PR4 a link check shows Google recognises no internal links. Also pages can't be found by searching on their URL.
Would that be because of the multiple variables & use of "id"?