301 Redirects Htaccess

301 Redirects Using .Htaccess

A 301 redirect is a permanent way to let search engines and visitors know that an old page on your website has been replaced by a new one.

If you would like to create your own redirects using your website’s htaccess, open your .htaccess file (typically found in the root of your website) and add the following code:

Redirect 301 /myveryoldpage.html http://www.yoursite.com/myverynewpage.html
Redirect 301 /login/ http://www.yoursite.com/account/

If you would like to redirect your entire website to a new website and you are keeping the exact same page structure you can add the following code to your old website:

Redirect 301 / http://mynewwebsite.com

As an example, the code above will cause http://myoldwebsite.com/documentation/services/glossary.html to redirect to http://mynewwebsite.com/documentation/services/glossary.html so there is no need to worry about creating separate redirection for each page.

One thing to note is that .htaccess redirections only work with Apache servers.

Share:

Share on facebook
Share on twitter
Share on linkedin

Found This Useful?

Follow us on Twiiter for the latest updates 

You May Also Be Interested In

Comments