Scroll To Top

Are you scared of htaccess redirects? Don't be, they are easy! In this article I explain how to do a 301 and 302 redirect using Apache's .htaccess file.

To use a 301 redirect you need to have Apache and Apache's mod_rewrite installed.

What is a 301 Redirect?

A 301 redirect means the page is moved permanently. A search engine will update this link and give the existing page rank to the new url.

What is a 302 Redirect?

A 302 redirect means the page is moved temporary. A search engine will check the original link each time it crawls.

How to do redirects in .htaccess

In your .htaccess file place the following

#This is how you do a 301 redirect
redirect 301 /old-page.html

#This is how you do a 302 redirect
redirect 302 /old-page.html

Wow, that was easy!