Skip to main content
Known Participant
February 22, 2010
Question

Use article title instead of ID

  • February 22, 2010
  • 2 replies
  • 849 views

Hi everyone,

I was recently reading about Web site SEO, and I came across an article that recommended using the title of a page/news article/etc. in the URL.  I've seen this method used a lot, but never knew why people used it.  It's pretty common, but so I'm making myself clear, the URL usually looks something like http://www.website.com/news/this-is-the-title-of-my-article.

On my site now I have a news section that links to stories via the ID number, i.e. http://www.website.com/news/news.cfm?id=12345.  Is there a way to link to articles like the example I used above while improving SE results?

Thanks a lot for any help!

    This topic has been closed for replies.

    2 replies

    Inspiring
    February 24, 2010

    One other thing to remember is to lock your query if you are querying a DB with a url var by using cfqueryparam inside your query.

    If you are not using an integer as a var, it is high risk to query a DB using a varchar variable passed in a url string.

    Dan, can you confirm if I am spot on?

    Regards

    Delon

    Inspiring
    February 22, 2010

    The only advantage that I can think of is that editing the url is less likely to give the user something he shouldn't have.

    Disadvantages?

    Query will probably run slower.

    Possibility of getting more than one record returned.

    Have to url encode then decode.

    Did the article say why it was a good idea?

    ilssac
    Inspiring
    February 22, 2010

    Dan Bracuk wrote:

    Did the article say why it was a good idea?

    Because, people beleive that words in your URL can be used by search engines to help determine what your page is about.

    I've done this in the past by creating actual three line pages on my site.

    <!---- My-Article-of-the-day.cfm--->

    <cfset articleID=83>

    <cfinclude template="articleDisplay.cfm>

    With ColdFusion <cffile....> functionality it it pretty simple to write out this file when new pages are created during an administration function.

    But tools like CFBlog.... use SE URL techniques something like www.yoursite.com/article.cfm/id/83/My-Atricle-of-the-day.  It then parses the URL of the id but most search engines will act like the end of the url is the file name.

    There are other tricks that can be used as well.

    February 22, 2010
    But tools like CFBlog.... use SE URL techniques something like www.yoursite.com/article.cfm/id/83/My-Atricle-of-the-day.  It then parses the URL of the id but most search engines will act like the end of the url is the file name.

    Just to elaborate on Ian's point above, do some reading up on "url rewriting".  If your using apache you can use mod_rewrite.  If your using IIS 7 you can use the built in feature, or with the other versions you can use Ionics ISAPI filter or Helicon Tech's ISAPI Rewrite.

    Another point I would make is, take SEO articles with a grain of salt, there is alot of BS out there.  Also check out http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35769 and http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf

    Cheers