URL Rewrites...Good or Evil? PDF Print E-mail
SEO/SEM
Written by Lyris HQ Staff Writer   
Thursday, 20 March 2008
http.gifIn modern day web development, URL rewriting is becoming more common. Never heard of it? I'll be glad to explain: URL rewriting is the practice of converting a URL from one format to another by the web server at run time.

 

But why would you be interested in converting URL formats? There are actually many reasons for using URL rewriting. The biggest reason is for search engine optimization purposed. This is especially prevalent in large, complex sites. Some search engines (like Google) have built-in algorithms that help determine ranking and relevancy of sites in their listings. One of the parts of that algorithm counts high numbers of URL parameters in web page URLs as potentially fraudulent behavior. We'll go further in depth as to the reasoning behind this rule in another article.

Now, to work within the algorithm parameters, web developers have started using URL rewriting techniques. The idea is to rewrite the URLs on the web site in such a way that it convinces search engine spiders that the website is static (and doesn't make use of URL parameters) when in fact it is a dynamic website with several URL parameters being passed around. For example:

www.mysite.com/product.php?catid=123&prodid=345&lang=en&region=CA&r=1

Notice the several parameters being passed from page to page. Now since these parameters could appear to be fraudulent to the search engines, the URL could be rewritten into the form:

www.mysite.com/product.php/catid=123/prodid=345/lang=en/region=CA/r=1

Notice that the "&" have been replaced with "/", effectively making it look like the URL parameters are actually folders on the web server, giving the appearance of a static web site. There are many such rewrite rules that a web developer could use to modify the URL.

Now, you may be thinking, "Great! Sign me up!" Well... slow down tiger... there are some considerations to keep in mind. You need to ask yourself what it means to implement URL rewriting. The typical implementation is as follows:

Visitor types in domain name ' web server rewrites URL hyperlinks on the web page into a more friendly format ' web server renders the page.

Then the visitor will click on a hyperlink and request an already rewritten URL, but in order to make sense of the rewritten URL (since this URL doesn't actually exist on the web server), the web server must convert the rewritten URL back into the original format with URL parameters. Once it's executed this original URL, the web server then logs this original URL to the log file.

And that's where a potential problem occurs. As a result of all of this writing and rewriting, what effectively happens is that the requested URL and the logged URL are different. This can cause some issues when it comes to analytics. For example, this means trouble for ClickTracks' Navigation report.

In the Navigation report, we show you the live web site as it looks right now. All the hyperlinks on the pages that you browse will be the rewritten URLs. Now, in order to calculate how many people click on any given link and display overlaid metrics on the links, we must match up each hyperlink with an entry on the log file. If we find 10 instances of a request to a particular URL, then we overlay the corresponding percentage on top of the corresponding hyperlink.

In the case of URL rewriting, there will never be a match between the hyperlinks on the live site and the entries in the log file. Therefore, all of your links appear to have 0% clicks within the Navigation Report.

Oh, man... now what do you do? Not to worry my fellow ClickTrackers, there's still hope. One of two things can be done.

1) Adjust the URL rewrite rules - It's possible set up the rewrite scheme to do a double rewrite. Currently, the web server rewrites all the URLs into more search engine-friendly formats for better presentation. Then, when one of these rewritten URLs is requested, the web server undoes this rewrite so that the URL can make sense to the backend system for execution. Now, it's possible to rewrite the URL once more after the page has been executed, back into the search engine-friendly URL before it is logged into the log file. When it does that, what happens is that the requested URL matches the logged URL and all is right in the world again. Please consult your friendly neighborhood web developer for the details of implementation. I can guarantee it will be ugly and/or potentially painful.

2) Sign up for ClickTracks Hosted - A much less painful solution is to sign up for ClickTracks Hosted. Hosted solutions work in a way that the URL that's requested is always the URL that's logged. This way, it becomes possible to bypass your web server's rewrite song and dance. Much easier don't you think?

For more information, check out the following link for a description of popular URL rewriting procedures:

Apache - http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

Comments (0)Add Comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smaller | bigger

busy
 
< Prev   Next >

Lyris HQ Client Login

Untitled Document
 
Forgot your password or forgot your user name?
The New Look of Lyris HQ
Advertisement
 

LyrisHQ

Lyris HQ provides a single marketing platform for the integrated products today's digital marketer needs: email marketing, web analytics, PPC bid management, SEO, and web content management. Also included is a unified calendar, a message board, and a centralized reporting dashboard.

EmailLabs

EmailLabs provides leading email marketing solutions to over 500 customers worldwide. Beyond our advanced technology and unrivaled reporting & tracking, we also offer our customers access to email marketing expertise and consulting services.

 Visit EmailLabs

ClickTracks

ClickTracks' award-winning web analytics software uses a radically different architecture to offer intuitive, insightful analysis of Web sites, showing users statistics on their campaigns, site navigation patterns, PPC, SEO and ROI.

 Visit ClickTracks

HotBanana

Hot Banana is an award-winning Web CMS that helps marketers build and manage SEO-friendly Web sites that can be automated and optimized for maximum lead generation and conversions.

 Visit HotBanana

EmailAdvisor

EmailAdvisor is an email deliverability toolset that provides important information on a company's email campaign, including a preview of how emails will render, content analysis, blacklist and ISP monitoring, audit capabilities, and more.

 Visit EmailAdvisor

BidHero

BidHero is a web-based campaign management solution that allows users to easily set up keyword bids on multiple search engines as well as other ad networks through a single interface and automatically update those bids.

 Visit BidHero