URL Rewriting SEO Friendly: Convert Dynamic URLs into Static URLs

- Wednesday, April 20, 2011

Get rid of those dynamic URLs from your website, with user friendly URLs

Static URLs are always known to be better compared with dynamic URLs in SEO, because of many reasons. Static URLs are always more users friendly to your website visitors, static URLs normally rank much better in search engines and search engines are known to index the content of static URLs a lot faster compared to dynamic URLs.

URL Rewriting SEO Friendly: Convert Dynamic URLs into Static URLs

There are two kinds of URLs over the web, and they are ‘Dynamic URL’ and ‘Static URL’. Dynamic URLs are generated by database-driven website, dynamic URLs are generated from specific queries to a site's database. On the other hand a static URL is a URL that doesn't change, and doesn't have any variable strings or appended parameters. Static URLs are typically ranked better in search engine results pages, and they are indexed more quickly than dynamic URLs.

Below is the example of types of URL:

Static URL: http://www.example.com/products/software/finance.html
Dynamic URL: http://www.example.com/products.php?type=software&name=finance

On a Linux Server with Apache Mod Rewrite Rule you can inconspicuously redirect one URL to another, without the visitor's and search engine's knowledge. You have to modify your ".htaccess" file. The web server compares the URL requested by the client with the search pattern in the individual rules.

There are two ways to achieve this – ‘Single Page URL’ and ‘Directory Type URL’. Suppose your dynamic URL structure is like this:
http://www.example.com/products.php?type=software&name=finance

Single Page URL

For Single Page URL, you have to modify your ".htaccess" file with the following code below:

Options +FollowSymLinks
RewriteEngine on
RewriteRule products-(.*)-(.*)\.html$ products.php?type=$1&name=$2

This will produce user friendly URLs like this:
http://www.example.com/products-software-finance.html

Directory Type URL

Even for Directory Type URL, you have to modify your ".htaccess" file with the following code below:

Options +FollowSymLinks
RewriteEngine on
RewriteRule products/(.*)/(.*)\.html products.php?type=$1&name=$2

This will also produce user friendly URLs like this:
http://www.example.com/products/software/finance.html

Now have a URL that will not only rank better in the search engines, but your website visitors will definitely understand you site architecture. Please note, if you are not particularly technical person, please read Mod Rewrite Rule before updating or modifying your ".htaccess" file.

Joydeep Deb

Marketing . Innovation . Technology

Share:

About the Author
Joydeep Deb

Joydeep Deb is a Senior Digital Marketer and Project Manager with strong experience in Digital Marketing, Lead Generation, Online Brand Management, Marketing Campaigns, Project Management, Search Engine Optimization (SEO), Search Engine Marketing (SEM), PPC, eMail Marketing, Web Analytics, Web Technologies, Web Design and Development.

With an MBA in Marketing. IIM Calcutta Alumini. Lives in Bangalore, Karnataka - India.

Get social with Joydeep at Twitter | Facebook | LinkedIn

Subscribe to Newsletter

Receive my latest posts right in your inbox? Enter your email address below to subscribe.

We'll never share your email with anyone else.