Disclosure: Hosting Canada is community-supported. We may earn a commission when you make a purchase through one of our links. Learn more.

301 vs. 302 Redirects

301 and 302 are the two types of redirects from a browser standpoint. Here 301 means “Moved Permanently”, whereas, 302 means “Temporarily Moved”. 301 is used in most of the cases as it preserves the SEO equity that the old URL might have and redirects it to the new page.

302 redirects have little to no use as there is hardly any reason to change a URL temporarily. Sometimes changing URL is necessary though it’s undesirable. Temporarily changing the URL with the plan to change it to the original URL later is a bad idea and is avoidable most of the time.

Redirect vs Rewrite

You can use .htaccess directives to change a URL in two different ways, one is the Redirect command and another one is the mod_rewrite engine. The browser gets a redirect message through the Redirect command that tells it what other URL it needs to look for.

And the mod_rewrite translates the requested URL into something that the CMS or the file system will understand and the request will be handled as if the translated URL was requested URL. Using it this way, anything happened is not noticed by the web browser and the content asked for is received.

You can use a mod_rewrite tool for producing 301 redirects that work in the same way as Redirect command works but with more rule options. The mod_rewrite can have complex rewriting instructions and pattern matching which can’t be taken advantage of by Redirect.