Copy link to clipboard
Copied
with regards to a database driven site that relies on a single page, 'show_merchandise.cfm' to display products, is it ok for Coldfusion to fill in the title and meta tags ?
eg.
<title>#title_info#</title>
<meta name="keywords" content="#keyword_info#">
Sure. Just because a site is constructed via a single CFM template, doesn't mean web users see that. They still see individual (ie: discrete) web pages.
It's important to get clear in your mind the difference between CFM files (templates) and web pages (as served by a URL). They are not the same thing at all, and bear only a superficial corelation to each other.
A single web page can comprise the processing of dozens or hundreds of separate CFM files. Or a single CFM file. Web users (be they
...You can use ColdFusion to dynamically insert 'title' and 'meta' tags by pulling data from your database and embedding it in your page headers. I’ve done this before while working at an SEO agency (https://pearllemonseo.ca/), and it’s a great way to optimize content for search engines!
Copy link to clipboard
Copied
Sure. Just because a site is constructed via a single CFM template, doesn't mean web users see that. They still see individual (ie: discrete) web pages.
It's important to get clear in your mind the difference between CFM files (templates) and web pages (as served by a URL). They are not the same thing at all, and bear only a superficial corelation to each other.
A single web page can comprise the processing of dozens or hundreds of separate CFM files. Or a single CFM file. Web users (be they human or automated) just fetch the end result (the HTML). They neither know nor care how the end result was constructed.
So in your case they see a <title> tag and some <meta> tags. It's irrelevant what mechanism you used to populate them.
--
Adam
Copy link to clipboard
Copied
Thanks Adam
So just to get things straight in my mind, it's perfectly acceptable to put coldfusion specific code before any html tags ?
eg. can I place my cf query BEFORE the <doctype> tag ? Or do I need to put it AFTER the <html> tag ?
Copy link to clipboard
Copied
Yep. You are still putting a "causal" connection between the two that does not exist. CFML doesn't know what HTML is; HTML doesn't know what CFML is.
All CF / CFML does is generate character data. You can use it to generate character data that a browser can interpret as HTML, sure. But CF doesn't know or care about that.
Within a CFML template (ie: a .cfm file), any text data that is not CFML is completely ignored by the CF server. It just reads it, and spits it back out again. All the CF server cares about is CFML (which it processes, and spits out the output of).
The web server collects all the spit (!), and sends it back to the browser.
So your doctypes and all that sort of stuff is completely meaningless to CF: it's just some text that it knows it can ignore and just pass straight back to the web server.
--
Adam
Copy link to clipboard
Copied
Yes it is acceptable, because search engines don't SEE the CFML.
All the CFML is executed on the sever and all the HTML (or other output) is sent to the client. Search engines are just clients like any other.
You may care about white space, but ColdFusion has several mechanisms that can be use to mitigate white space.
Copy link to clipboard
Copied
Your ColdFusion code can be anywhere. HTML doesn't have an impact on
the CF code. When the page is opened on a browser the server passes
it to CF which processes all of the ColdFusion code, then sends it
along to the browser. The browser only ever sees the HTML and other
output you specify in the code, not any ColdFusion code.
That said, many people prefer to keep most ColdFusion code at the top
before any output, as it is easier to read and work on later, vs
embeded into html tags throughout the page. Or use a framework to
further separate the code and logic from the view (display).
Joshua
Copy link to clipboard
Copied
Dax,
Make it a habit to always put tag.
Copy link to clipboard
Copied
Adam Cameron. wrote:
So in your case they see a <title> tag and some <meta> tags. It's irrelevant what mechanism you used to populate them.
--
Adam
I believe his question was how would search engines react if they see that this one URL has a bunch of different content attached to it.
I think that modern search engines recognize this and as long as there is a discrete URL, including URL parameters, always return the same content you should be fine.
But, if you care to, you can do what I have done in the past.
Create simple two line files for each item.
The content of those files consist of something like:
<cfset variable.uniqueID>
<cfinclude template="masterTemplate.cfm">
It is fairly easy to use CFML to automate the creations and maintainance of these file.
Copy link to clipboard
Copied
so a single page 'show_product.cfm' who's <title> and <meta> tags each time, for a different product is OK ?
Is this the preferred strategy for good SEO when using a database driven site ?
Copy link to clipboard
Copied
Dax Trajero wrote:
Is this the preferred strategy for good SEO when using a database driven site ?
Preferred, I can't say. There seems to be a lot of SEO strategies, and I suspect many of them may not be all that informed.
But I know it is a very common strategy. And since I can find plenty of products by searching for them on search engines and I end up on web site pages that use the singe product page with URL parameters. I am fairly confidant in saying that the Search Engines are perfectly capable of indexing this content.
I would also say that changing the title and meta tags would be better then NOT changing them.
Copy link to clipboard
Copied
From an SEO perspective it's not brilliant, but it's better than nothing.
Bear in mind that most search engines will ignore URL parameters when indexing a page, so Google (for example) will index your (say) /product.cfm?productid=231 with all its content about product 231. However, anywhere it finds links to other products all it will see is a link to /product.cfm, which it knows it's already indexed and so will not index it again.
The ideal way is a full SEO-friendly rewriting system, look into ISAPI rewrite (or mod_rewrite on linux), or the new rewriting engine written into IIS7.
In saying that search engines do seem to be better with URL parameters these days, so it's not a disaster.
Copy link to clipboard
Copied
Owainnorth wrote:
Bear in mind that most search engines will ignore URL parameters when indexing a page, so Google (for example) will index your (say) /product.cfm?productid=231 with all its content about product 231. However, anywhere it finds links to other products all it will see is a link to /product.cfm, which it knows it's already indexed and so will not index it again. disaster.
I've been told the exact oposite. That, as long as their are real links to each product, the better search engines, such as Google, will NOT ignore the URL parameters.
What they will ignore is JavaScript based links to a long list of products. So, for example, if your only links to your product.cfm page is a Select LIst in a form that uses JavaScript to get to the correct product. Those pages will not be indexed.
But if you have straight forward anchor tags <a href="product.cfm?productid=231"....>, this would be indexed differenctly then <a href="product.cfm?productid=456"...>.
And since I can find PLENTY of pages just like that in my searching, I beleive there is plent of truth in this.
Copy link to clipboard
Copied
Bear in mind that most search engines will ignore URL parameters when indexing a page, so Google (for example) will index your (say) /product.cfm?productid=231 with all its content about product 231. However, anywhere it finds links to other products all it will see is a link to /product.cfm, which it knows it's already indexed and so will not index it again. disaster.
I've been told the exact oposite. That, as long as their are real links to each product, the better search engines, such as Google, will NOT ignore the URL parameters.
Yeah. Maybe about 5-10yrs ago they had issues along those lines, but not these days.
--
Adam
Copy link to clipboard
Copied
This is not correct. A few sample Google searches can demonstrate this to you. It isn't necessary to use "SEO-friendly" schemes to get your content indexed, although arguably they may produce better relevance in searches (this isn't clear one way or the other, as far as I can tell).
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
Read this before you post:
http://forums.adobe.com/thread/607238
Copy link to clipboard
Copied
Okay, okay, I get it, no need for a third person to say the same thing
I'd still always use a rewrite over an url parameter anyday, as I don't see how search engines can reliably tell which url parameters are relevant to the content shown (ie they cause a different page to be displayed) and which are related to your user experience, search orders, filters and such.
I'm aware things have moved on, just pointing out that there are other ways out there
Copy link to clipboard
Copied
Okay, okay, I get it, no need for a third person to say the same thing
I get the impression that a few of the respondents here reply to the first email they see in their in box, without necessarily reading through the rest of the thread first (ie: via the web UI). I would not take it personally. And am not suggesting you are.
I'd still always use a rewrite over an url parameter anyday, as I don't see how search engines can reliably tell which url parameters are relevant to the content shown (ie they cause a different page to be displayed) and which are related to your user experience, search orders, filters and such.
Me too... using rewrites I mean. Still: that's more a cosmetic thing than anything else, I think. As for which params mean what to the content? Google (etc) look @ the content. If they find more than one URL pointing at the same content, they ignore some of the URLs and index one of them. Which URL they preserve? Dunno. But the whole process is content-centric, not URL-centric. They might weight some forms of URL more than others, or it might be the "oldest" or the "newest" one they found. Also, search order & filtering affect the context of the content within the document, so are still signficant in the indexing & weighting process.
Of course I am not an SEO expert, but just like them: I can make sh!t up about how it all works. That's all SEO "experts" do, after all.
--
Adam
Copy link to clipboard
Copied
If you were an SEO expert you'd have posted exactly the same reply, but would've dropped me a bill for a grand at the same time
All very interesting points but agreed, unfortunately no-one knows except Google, so we can but speculate.
Copy link to clipboard
Copied
If you were an SEO expert you'd have posted exactly the same reply, but would've dropped me a bill for a grand at the same time
Oh, did I accidentally say I wasn't an SEO expert. I meant I was.
The invoice is in the mail...
--
Adam
Copy link to clipboard
Copied
Dag nam it Batman!
Copy link to clipboard
Copied
What we NEED is a SEO Expert EXPERT....
Copy link to clipboard
Copied
I'm sure Larry will be along shortly
Copy link to clipboard
Copied
Thanks, for help.
Copy link to clipboard
Copied
Hi Adam,
Hope you are still on the platform 2years later as in now. I was hoping you'd help me with a similar question I have.
I am running coldfusion for my website and would like to create someting similar to what Dax noted earlier, being
<title>#title_info#</title>
<meta name="keywords" content="#keyword_info#">
Where would the appropriate spot be for this to be placed so as not to affect the website. Would I have to place it before <!DOCTYPE html ... or somewhere after this?
Your utmost help will be greatly appreciated. Or anyone with wome good knowledge of CF.
---
Knox
Copy link to clipboard
Copied
@Abkaniki,
It's almost 2 years to the day and this thread had been answered. My suggestion is that you should start your own new thread.
Copy link to clipboard
Copied
BKBK. I mean't well and I will make note.