How To Redirect An Entire Web Directory URL

noam design blog urlIf 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.

Related Post:

4 Comments

  • Frank
    I did what you said and it works perfectly. So thanks!
  • Ed
    Yep. That’s the way to do it.
  • web design bristol
    Can you not use 301 or rel=con?
  • web design calicut
    That’s great! Helped me a lot – thanks!

Leave a Reply

Sorry - this blog is now closed to new comments.