Skip to main content

.htaccess Redirect for SEO

Search Engines like to see a website's keywords embedded into the URL. So if I'm selling energy saving washing machines, most SE's, I am told, (Google included) like to see a URL that looks like:
But if you don't have access to that fancy domain name, then the next best chance is to use something like:
This can be setup using a .htaccess file in the document root directory of the website. Simply create a .htaccess file and drop in the redirection directive as follows:
Redirect /energy-saving-washing-machines ""
So anybody clicking on will be redirected to

No need to restart/reload Apache

For any such redirections to start working, Apache doesn't need to be reloaded. Just updated the .htaccess file, save it (and make sure it has public read permissions).

Regular Expression Match with RedirectMatch

In case a regular expression match is needed, for example we wish to match both energy-saving-washing-machines and energy-saving-cars, the RedirectMatch directive can be employed instead of Redirect. Use it like:
RedirectMatch energy-saving-* ""
I find this particularly useful for performing matches for keywords and their plurals (ex. and, both of which are relevant keywords from SEO perspective.


Do search engines have a preference on if the Redirect directive is used with Permenant or Temporary (default)?


Excellent .htaccess resource: