Rewrite dynamic URLs

A common problem for online stores, forums, blogs or other database-driven sites is: pages often have unclear URLs like this: www.weddinggift.com/?item=32554, and you cannot say which good or article it leads to. Though instead, they could have URLs like www.weddinggift.com/silk-linen.html, or www.weddinggift.com/pots.html, where you can easily see what’s on the page.

So the problem with such URLs is: no one (neither users, nor even the Robot) can tell what product can be found under the URL before they land on this page.

For simplicity, let’s assume that URLs like this, www.weddinggift.com/?item=32554, having parameters (here it’s item=) are called Dynamic URLs, while URLs like www.weddinggift.com/silk-linen.html are static. As you can see, static URLs are much more user-friendly. For users, URLs with too much of "?”,

"&” and "=” are hard to understand and pretty inconvenient. It may surprise you, but some guys prefer to memorize their favorite URLs, instead of bookmarking them!

Secondly, static URLs are generally shorter and may contain keywords, which are positive signals for Search Engines. Thirdly, a search engine wants to only list pages in its index that are unique. And sometimes Search Engines decide to combat this issue by cutting off the URLs after a specific number of variable characters (e.g.: ? & =). To make sure all your pages with unique and useful content appear in a search engine’s index, you’d rather make your URLs static and descriptive, if possible.

And now I’ll tell you about a nice trick to make URLs look good to Search Engines.

There’s a file called .htaccess. It’s a plain-text file, and using it, you can make amazing tricks with your web server. Just one example is rewriting dynamic URLs. And then when a user (or a robot) is trying to reach a page, this file gets a command to show a page URL that is user- and crawler-friendly.

This is, basically, hiding dynamic URLs behind the SE-friendly URLs. I’ll give you an example for an online store.

As a rule, a page URL for some product looks like this:
http://www.myshop.com/showgood.php?category=34&good=146

where there are two parameters:
category — the group of goods
good — the good itself

At the same website, you may be offering Dove soap in the category of beauty products, with the URL:
http://www.myshop.com/showgood.php?category=38&good=157

And a bra by Victoria’s Secret, under:
http://www.myshop.com/showgood.php?category=56&good=54146

To Search Engines, both pages appear like showgood.php. They just can’t understand that these are two different pages offering two different products.

You can rewrite pages, so the Robot will see that both pages contain different information: http://www.myshop.com/beauty-products/dove-soap.html instead of the first URL, for Dove soap and http://www.myshop.com/victorias-secret-underwear/bra.html for a bra by Victoria’s Secret, as you may guess.

Thus you’ll get "speaking URLs” that are understood by Robots and users and are easy to check.

Writing an .htaccess file is not a trivial task and requires special knowledge. Moreover, it’s your webmaster’s business. I personally never do this myself. So if you have a database-driven site, search the Web for a special SEO service that will write an .htaccess file for you.

Or, if you’re using a fairly well-known 3rd-party engine, you can write the .htaccess file yourself, using some scripts that you can find in the Internet. To do the search, you can type in the_name_of_your_ site’s_engine “URL Rewrite” htaccess or something like that.

For instance, I used the following query: phpBB “URL Rewrite”

And got a number of results:

Now, the idea is: it’s of great use to rewrite URLs. So find the URL rewrite tools if you need them — or just find your webmaster.

Then, one more thing, the old URLs that have parameters should be "hidden” from Search Engines. So, use robots.txt we talked above to forbid the old URLs like this: http://www.myshop.com/showgood.php?category=56&good=54146


© SEO in Practice

>>> Back to TABLE OF CONTENTS <<<
Category: Article | Added by: Marsipan (27.08.2014)
Views: 400 | Rating: 0.0/0
Total comments: 0
avatar