This post is also available in: Español Italiano

URL Rewriting

What is URL Rewriting?

URL Rewriting, is this technique that must be implemented to transform a complicated or barely intelligible URL into a easily readable URL and more understandable for the Internet user and search engines at a time.
It is necessary since dynamic sites often generate long and codified page URLs.

Why do we have to create this solution called
URL Rewriting  ?

Naturally, the address of a dynamic page complicates the work of search engine indexing robots.
Why do we have to create this solution called URL Rewriting  ?
Because taking into account the different variables at play, a dynamic website generates for its pages most of the time complex and long URLs including codes incomprehensible for the Internet user and difficult to classify for the indexing robots.
Those URLs which are in a form like or are generated from automatically and the SEO chances of a site will be even less great the more it contains a large number of pages.
Unhindered indexing, in other words good referencing, is obtained by writing the URL more explicitly in the first case and by transforming special characters for easier reading in the second case.
There are also other SEO benefits of transforming exotic URLs into clean URLs, including the ability to change the website hierarchy without disrupting web addresses and the control of keywords appearing in URLs.

What are the steps to follow to rewrite URLs?

URL Rewriting

You must first try to find out if the host of your dynamic site is a server that allows URL rewriting.
For example, Apache allows this by activating its “mod_rewrite” module.
The same goes for Microsoft's IIS which in ASP uses ISAPI filters that the user can buy, and in ASPX (.NET) offers functions like RewriteURL.
In principle, free hosting does not allow rewriting, which is not an ideal situation for SEO.
On the other hand, if your server is dedicated, you will only have to modify the configuration file for the rewrite to be supported and then restart.
The second step is to find the pages whose address has parameters to define their URL schemes, and then write a new, clean URL scheme.
Thus a URL ending of the form “article.php? Id = 36 & page = 5 & section = 3” could become “article-36-5-3.html”.
The advice in this step is to use separators like “-“, “.
“,” / “And” + “which are well recognized by Google instead of” _ “,”, “,”;
“,” & “,” # “And” $ “.
The third step is to write the rewrite rules to the appropriate .htaccess file.
The fourth step is to change all the links to each file whose URL has been changed.
The fifth and final step is to update your website and see if everything is in order.