By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,253 Members | 1,693 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,253 IT Pros & Developers. It's quick & easy.

SEO Friendly URL Rewirting

100+
P: 190
I am having a site http://bhoomiandbhavan.com/index.php ( under construction ) ,

I want to know that how can i write the SEO Friendly URL Rewriting code for listings ?
May 21 '10 #1
Share this Question
Share on Google+
2 Replies


dlite922
Expert 100+
P: 1,584
Search Engines are smart these days, you don't need friendly URL to search engines, you need friendly URLs to the user.

To search engines, these two are the same:

...com/viewproperty.php?id=123
...com/viewproperty/id/123

Just use dashes instead of underscores, avoid long query strings (e.g. from a form submission)

As far as the method to do it? the most popular one is Apache's (or your webservers) mod_rewrite function. If this site is hosted, your host may limit if you can do this or not.


Dan
May 21 '10 #2

Atli
Expert 5K+
P: 5,058
Yep, modern search engines actually prefer to have the original query string, rather than a rewritten URL. When you rewrite the URL, you are basically "hiding" information, and in some cases making it impossible for the crawler to figure out what the available information means.

For example, if you have this URL:
- http://example.com/article.php?id=123
A search engine will be able to deduce the following:
  • This is a PHP page; dynamically generated content. (This may affect caching or re-crawl rates, or any number of other things.)
  • The current page is tagged with an "id" of "123". (Useful for obvious reasons.)

If you were to rewrite that into this:
- http://example.com/article/id/123/
You are basically:
  • Giving the false impression that this is a static page (meaning; not modified by query string parameters).
  • Hiding what the number "123" actually is. It would simply be considered a directory name; a sub-directory of the "id" directory, rather than a parameter linked to the "id" keyword.

It is best for the search engine (and thus your rating) if you just use the query string as it was meant to be used, rather than try to "trick" the search engine into thinking that a dynamic page is static. (Static pages rank no higher than dynamic once.)

However, you would be wise to limit the query parameters to two or three values, and try not to mix the order of the parameters to much. It's also best to use proper words, rather than single letters or illegible abbreviations. (Both search engines and users may be able to determine context based on keywords. Like, the parameter name "desc" would infer a description, where the letter "d" may not.)
May 22 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.