SEO Friendly URLs

Posted in Uncategorized | 1 comment

Share

When we talk about online business and websites ranking race, SEO (search engine optimization) comes to our minds instantly.  SEO has many important factors and the most important of them all is URL of web site. Think about a site having two URLs, one is www.mysite.com/pets-cats and the other URL for the same site is www.mysite.com/pets% “P?$^10/10.htm. Now which one is more easily understandable and good looking for user eye? The first one shows that in a site about pets, there is a pet section and it has a category in it call “cats”. In the second case the URL contains certain symbols or database query results and is not giving any detail about the page. Also the first URL is easy to remember by the site visitor and they can revisit that page again if they keep the URL in mind but the second one cannot be remembered.

SEO friendly URL is the one that gives certain good details of what the page or site is about and what can be its contents. These URLs are easily process-able and understandable by the search engine crawlers as well as by the end user or site visitor. Through a SEO friendly URL, you are telling the search engine what your site is all about and making it easily understandable by it. Once the search engine can understand your site, it will naturally pick it as a result of a query and chances are greater that it will rank the site higher.

How to make a URL SEO friendly (URL Re-writing):

On web we see some sites have very SEO friendly URLs while certain don’t have such URLs. If some site owner has not a user friendly URL and want to make user and SEO friendly, there is a technique called “URL Re-writing”. In this process you re-write the URL using some tools provided by your site host server and make the URL more search engine and user friendly. One problem with URL re-writing is that a SEO friendly URL can be easily understand by search engines and the site visitors but they are not understandable by the web server. So we write some code or command so that the query to web server and database of site would remain the same (symbolic) internally but the URL at the address bar of browser would display in a SEO friendly manner. So the web hosting server, search engine and site visitor would remain easy at their ends.

Tools for URL Re-writing and .htaccess file:

Depending upon the software your host server is using, there are certain URL re-writing tools available in the system. In some cases these tools are built in as for example in Apache servers while in others they can be installed and approached by requesting your ISP.

The easiest URL re-writing is available in Apache based servers where there is a built in module call “mod_Rewrite”. To start with URL re-writing, we first of all look for or create a file called “.htaccess” file in the root folder of the site. The .htaccess file is a control or configuration file that causes configuration changes at the host server software or as in this case Apache. You create this file and place it at your host server and in order to transfer and place it at your host server, you must be careful as if there occur any error, the server will display the error message. The .htaccess file performs two tasks:

  • It tells the Apache to turn on re-write engine at its end (command used is RewriteEngine on)

  • It tells Apache which rules the engine must use for re-writing URL

If we want to re-write the above mentioned URL from this form www.mysite.com/pets% “P?$^10/10.htm to a SEO friendly form “www.mysite.com/pets-cats” the command will be somewhat like this:

RewriteEngine on

RewriteRule      ^pets-cats/?$       pets% “P?$^10/10.htm    [NC]

^pets-cats/?$: This section is called the “pattern”. Whenever the request for this URL will come to server, the server will match the pattern in its database to any “Substitution” of the URL and will use “Substitution” for its own processing and finding and will display and return the “pattern” as a query result. The pattern is what is displayed on the address bar of the browser when the requested page is returned as a result of the query. This is basically SEO friendly URL.

pets% “P?$^10/10.htm: This is called “Substitution” and will be used by server for its processing and understanding. The Substitute is what the actual address of a certain page with respect to web server.

When a request for a web page is sent in form of “pattern” (or SEO friendly form), the server looks for its match that whether its “substitute” is present, and when it finds the “substitute” it will swap the “pattern” with “substitute to find out requested page in database and will display the result page URL in form of “pattern”.

So the server process the request in its own understandable way and will return the results in “our defined” way in browser.

[NC]: This is a Flag; A Flag tells Apache how to apply re-write rules. In this case the “NC” is telling Apache that re-write rule is case-insensitive.

Share

Leave a Reply