Static URL's Make For Good Spider Food
Google has come a long way in parsing dynamic pages in their listings and just because the Google spider isn't choking on your dynamic URLs anymore doesn't mean it isn't missing them in the index. They are still giving preference to static URLs. Google will accommodate dynamic URLs to a point, but it doesn't like them so you want to make adjustments for good high listings of all your pages.
All search engine spiders always prefer static URLs over dynamic URLs, and if you have a large, dynamic site that you want to get fully, quickly and frequently indexed by the search engines, then rewriting your dynamic URLs is a must. It's easy to get started with some basic URL rewriting.
You'll need to edit or create an .htaccess file in whichever directory you will be rewriting your URLs. An .htaccess file is an Apache server configuration file that lets you make changes to your server setup on a per-directory basis. Now let's say say you have a dynamic URL that looks like:
http://www.yoursite.com/index.php?item=computer&brand=dell
…and you would like to have a more search engine (and user) friendly URL such as:
http://www.yoursite.com/computer/dell
To accomplish this, simply add the following two lines to your .htaccess file:
RewriteEngine On
RewriteRule computer/dell index.php?item=computer&brand=dell
(Note: there is a space between the words dell and index.php in the line above)
The first line turns the mod_rewrite engine on. The second line consists of three parts:
1. RewriteRule - This part lets the server know that you're about to specify a rule to rewrite your URL.
2. computer/dell - This is the way you want the dynamic part of your URL to appear to spiders and other visitors to your web site.
3. index.php?item=computer&brand=dell - This is the way the dynamic part of your URL appears currently.
And now you've hidden your dynamic URL from any search engine spider and they have a static URL instead and that makes them happy.
Filed under Blog by admin
















Leave a Comment
You must be logged in to comment