URL Rewriting – SEO for Dynamic Pages

Dynamic URL Rewriting

A lire aussi : How to Optimize Your Website for SEO?

Today, it is very common to develop your website using a dynamic language to execute server-side actions. The main languages are primarily PHP and ASP.

Variables in the URL

In both PHP and ASP, it can be very useful to pass variables in the site’s URL to meet certain needs: article identification number, pagination…

A découvrir également : Website Design for Organic SEO - Free SEO

A small example to be a bit clearer, with an address that contains two parameters:

http://www.maboutique.fr/article/?id=4&cat=23

The major problem with this type of URL is that some search engines ignore the pages it refers to. It is recommended not to exceed more than two parameters in the URL to avoid being ignored by search engines like Google and harming your SEO.

Solution

The most recommended and commonly used solution is to rewrite the URLs in the proper format for search engines. This technique is called URL rewriting.

The goal is to reproduce a URL that is easily identifiable and contains the keywords of your page.
Let’s take our online store again:

http://www.maboutique.fr/article/4-Wii-Nitendo.htm

The result is surprising! At a glance, you can guess the content of the page.

Search engines are very fond of this kind of URL, and they will reward you for it 🙂

To take advantage of this technique, everything happens in the .htaccess file of your site:

RewriteRule ^article/([0-9]+)+([a-z]+)+([a-z]+)+(.htm)?$ article/?=$1&cat=$3 [L]

The goal of this tutorial is not to explain how URL rewriting works but to introduce you to this technique that will help with your natural SEO.

To learn everything, check out this excellent tutorial published on the Site du Zéro 😉

URL Rewriting – SEO for Dynamic Pages