If you change your site’s URL structure, you’ll probably need to redirect entire directories of your website to ensure that no links are lost.
This is very important for SEO and to not loose any incoming links to your site. So here’s how it’s done:
For example, we’ve changed the URL structure of this blog from “www.noamdesign.com/Web-Design-Blog/” to “www.noamdesign.com/blog/” this was part of our efforts to simplify our website. Also shorter URLs are easier to promote, remember, and link to.
Now you don’t want to lose any links! So all inside links such as “/Web-Design-Blog/post-permalink/” should redirect permanently to “/blog/post-permalink/”.
To redirect all the links in a web directory to a new directory all you have to do is add the following line to your .htaccess file:
redirect 301 /old-directory http://www.yourwebsite.com/new-directory
Where of course “www.yourwebsite.com” is your site’s domain name. That’s it.
4 Comments
Frank
May 20, 2010 at 2:06 pmI did what you said and it works perfectly. So thanks!
Ed
May 20, 2010 at 2:09 pmYep. That’s the way to do it.
web design bristol
July 14, 2011 at 4:24 amCan you not use 301 or rel=con?
web design calicut
July 16, 2011 at 10:49 amThat’s great! Helped me a lot – thanks!