Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to make coldfusion dynamic pages SE friendly?

Status
Not open for further replies.

psteja2000

Programmer
Feb 1, 2005
82
0
0
US
I was looking for stuff on making my application dynamic pages Google friendly. Does anyone know how to make it happen?

regards,
Teja
 
There's really nothing to do, Google (and other search engines) read dynamic content just like a browser.



Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
Fiction: Sites are not included in Google's index if they use ASP (or some other non-html file-type.)
Fact: At Google, we are able to index most types of pages and files with very few exceptions. File types we are able to index include: pdf, asp, jsp, html, shtml, xml, cfm, doc, xls, ppt, rtf, wks, lwp, wri, swf.

now this isn't to say if you do crazy stuff with your nav like use real obscure javascript or frames with your cfm pages your site will be SE friendly.

<cfset myName = "Bob">
<cfoutput>Hi, my name is #myName#</cfoutput>


that produces the same thing for an SE as it does for a browser so its just as easy to read.

"Hi, my name is Bob" it's just text.



We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
for example if I have a show-product.cfm?pid=322

since it is a dynamic page, most of the SEs balk at ?. Instead I have read stuff where they say a directory structure like convention is used to refer to teh dynamic page. Like,

will refer to the actual dynamic page with the parameter.

So how to do this.. anyone has any clues?

regards,
Teja
 
i posted something like this already a few months ago. do a simple search in any web address. look at the indexed address. i'll argue that any engine you pick will have query strings in the url if the page is generated dynamically. your ? assumption is either false or grossly outdated.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
I have the following url string on my web site that has been indexed by google (and Yahoo! and MSN and Alta Vista and Lycos, ect...).
Code:
services.cfm?T=%21%280%20%20%0A
Not only is it dynamic, it is also encrypted then url encoded.

I haven't found a search engine (or even the W3C Validator) to have a problem with it yet. I actually built the site and never even submitted it to any search engines, they all just spidered it and picked it up on their own.



Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
here is the last thread about this issue.

thread232-1032562

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
It's true, dynamic pages (with url variables or not) have no problem being indexed in Google. This doesn't mean that other SE's don't have a little more difficulty. And there are certain instances where Google will balk at it as well. If you have SessionID's in your url string for instance. Or if you have a LOT of variables (think 3 or more) in your url string. Sometimes having url variables named 'ID' can cause problems (or at least it did for me a couple of years back - might be better now).

And yes, there are ways to flatten your urls. Besides the SE benefits, there is also some security benefit in hiding the server application you are using. And, one day, if for some crazy reason you decide to change to PHP, ASP or some new-fangled scripting language, you could still use the same filenames! Changing filenames can often have nasty effects in the SEs - so flattening urls can help future proof your site.

The best solution I could come up with on a Windows box is an ISAPI filter - ISAPI Rewrite. On Apache, you have mod_rewrite built in. Do Google searches for whichever one is relevant to you to find out more.
 
On one site, we have over one million products listed on the site. We took to the task of creating index pages for search engines, with a series of menu pages getting more and more specific until finally landing on the individual product page after three links or so. We had a lot of difficulty initially getting very many product pages picked up, until we changed all of the links on the pages to use a ".cfm/" scheme instead of a ".cfm?" scheme. After making that change, we started to see a big difference. So, from purely anectodtal evidence, it would appear that there is some benefit to disguising dynamic pages as having static links.

Here's how we did it:

Old link : "/product.cfm?manuf=acme&pn=ABC123"
New link : "/product.cfm/acme-ABC123"

The product.cfm page starts like this:
Code:
<cfset pathinfo = cgi.path_info>
<cfif pathinfo contains "/product.cfm/">
 <cfset pathinfo = listlast(pathinfo,"/")> 
 <cfset url.manuf = listgetat(pathinfo,1,"-")>
 <cfset url.pn = listgetat(pathinfo,2,"-")>
</cfif>

And the same old link style can still be used elsewhere on the site.
 
So, from purely anectodtal evidence, it would appear that there is some benefit to disguising dynamic pages as having static links.

It's because even though search engines index dynamic pages, they are also very cautious so that they don't get caught in an eternal loop, meaning in some cases they won't index as many pages.

Here's how we did it:

Old link : "/product.cfm?manuf=acme&pn=ABC123"
New link : "/product.cfm/acme-ABC123"

We do something similar, however broke it at the slash character, so we ended up with the following format:

page.cfm/var/value/var/value

Hope this helps

Wullie

Fresh Look - Quality Coldfusion/Windows Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
I think it's pretty much outdated now but i use the following cf_fakeurl custom tag: I tend to call it in application.cfm:

Code:
<!---
<CF_FakeURL> 
Creates URL parameters from values passed as part of the path (as opposed to in the query_string). This technique helps ensure that search engines and spiders index pages that might have been ignored (as some ignore any dynamic URLs). 
Using this tag, a URL like this: 
foo.cfm/FName/Ben/LName/Forta 
will be processed and two URL variables will be created: URL.FName=Ben and URL.LName=Forta. 
To use, simply place <CF_FakeURL> anywhere in your page (before the first URL variable is needed). By default / is used as the delimiter; an alternate delimiter may be specified in the DELIMITER attribute. 
Ben Forta - ben@forta.com
12/1/2001
---> 
<!--- Delimiter, defaults to / --->

<cfif cgi.path_info eq "">
<cfset cgi.path_info = "/">
</cfif>
<CFPARAM NAME="ATTRIBUTES.delimiter" DEFAULT="/"> 
<!--- Extract "query_string" from full path --->

<CFSET query_string_length=Len(CGI.PATH_INFO)>
<cfif query_string_length eq 0>
<CFSET query_string= "#cgi.path_info#"> 
<cfelse>
<CFSET query_string=Right(CGI.PATH_INFO, query_string_length)> 
</cfif>
<!--- How many items in "query_string? --->
<CFSET items=ListLen(query_string, ATTRIBUTES.delimiter)> 
<!--- Must be an even number, if odd, bail --->
<CFIF items MOD 2 IS 0> 
<!--- Loop through list, pair of items at a time --->
	<CFLOOP FROM="1" TO="#items#" STEP="2" INDEX="i"> 
<!--- Get each pair, first is name, second is value --->
		<CFSET i1=ListGetAt(query_string, i, ATTRIBUTES.delimiter)>
		<CFSET i2=ListGetAt(query_string, i+1, ATTRIBUTES.delimiter)> 
<!--- Save this URL parameter --->
		<CFPARAM NAME="URL.#i1#" DEFAULT="#i2#"> 
	</CFLOOP> 
</CFIF>

I think i had to make some changes to the original script for it to work with cf7 (which the above should). then just reference all links with a full path and replace the query parameters (?&) with slashes (/).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top