URL Rewriting for SEO
November 30th, 2008I wrote a post recently called Affiliate Marketing with Worpress Blogs. The explanation about URL rewriting got so lengthy, I thought I would write a separate post on the topic.
What is URL Rewriting?
Rewriting your URLs involves changing a dynamic URL to a static URL. This is typically done to fool search engines into thinking your dynamic pages are actually static pages.
Why is it Important to use URL Rewriting?
Simply put: static URLs perform much better than dynamic URLs in search results. So, if you have a dynamic, database-driven site you need to make the data in your URL appear as if it is calling a static page. URL rewriting helps your pages get better rakings in search results on all the major search engines. It is one of the most important SEO tricks you can know.
What is the Difference Between a Static URL and a Dynamic URL?
In a dynamic URL, the file name of a page on your website is followed by a “?” and other data. Here is an example from FatCatReport.com. When a user runs a search, this is the dynamic URL that is generated:
http://www.fatcatreport.com/index.php?s=apples
This “other data” determines what is displayed on the page. In the above example, a list of posts and pages with that contain the word ‘apples’ will be displayed.
A static URL contains only names of folders and files. If I was to rewrite the above URL, I would make it appear as if I have a folder on my site called “apples” that contains a file called ‘index.php.’ I might rewrite it to look something like the following:
http://www.fatcatreport.com/apples/index.php
How to Rewrite Your URLs
If, like the majority of websites, yours is hosted on a UNIX-based server running Apache Web Server, you’ll use an .htaccess file placed in your root directory to rewrite your URLs. Here’s how to recreate your own .htaccess file. However, creating an .htaccess is complex. So if you are not very technically savvy you might want to consider hiring someone on Elance.com or Get a Freelancer.com. I have hired freelancers using both these websites, and you can usually find someone for a very reasonable price.
If you your site is a blog and you use WordPress software, there is good news. URL rewriting is much easier with WordPress. To learn how to do this, visit my post on URL rewriting on a WordPress blog.