Question : Dynamically Embed Canonical link in Head using ColdFusion

Hi all. As you may know, Canonical links are a way of telling Google, Yahoo and MSN search engines the preferred URL of a page, (i.e. http://example.com/ vs. http://www.example.com/index.htm).

I have created a script to determine each page's URL, concatenating "http://www.example.com" with data from #cgi.script_name# (to get the page name), and cfsetting it to a variable named "canonicallink".

My question is: What ColdFusion code can I use to embed the variable "canonicallink" within the <HEAD></HEAD> area so that it displays in the source code for search engines to see, but not on the page, (similar to how a meta tag is displayed).

Thanks!
Tom

Answer : Dynamically Embed Canonical link in Head using ColdFusion

Random Solutions  
 
programming4us programming4us