Saturday, October 19, 2013

Steps to rename wordpress website folder without ruining SEO

You didn't want WordPress files to clutter the root folder of your web host so you installed WordPress in a sub-directory named 'blog' or 'wordpress' etc. Now you later realize that having your webpage's URL appear as http://solsarc.org/wordpress/our-services/ isn't a good idea after-all(maybe it looks unprofessional or may be it's bad for SEO). Instead you want the URL to be something like http://solsarc.org/school-and-therapy/our-services/ . Houston, we have a problem!

Steps:
  1. Log-in as admin. Go to settings-> General panel. In the box for Site address (URL): change the address to the new directory's URL. Example: http://solsarc.org/school-and-therapy
  2. Go to http://goo.gl/f85WZj  and follow the steps mentioned under the heading "When Your Domain Name or URLs Change" to safely change all  instances of your URLs
  3. Change the name of the folder in which WordPress resides (e.g from 'wordpress' to 'school-and-therapy')
You now have the URLs appear as you wanted them too. But wait, your website appears in Google search and when Google realizes that http://solsarc.org/wordpress/ no longer exists, it's going to get mad at you and probably penalize your site's rankings(and ruin your website's Search Engine Optimization). Steps to prevent that:
  1. Generate a new XML sitemap for your website and submit it to Google Webmasters
  2. Put a 301 redirect for all http://solsarc.org/wordpress/* pages. To do that, create a .htaccess folder in the root of your web host(note: WordPress folder has  it's own .htaccess file, we are not talking about that) and put the following in it , replacing 'wordpress' and 'school-and-therapy' with your own folder names:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^wordpress/(.*)$ /school-and-therapy/$1 [R=301,NC,L]

That's it! Google(and anybody else) will still be able to use the old address(with old folder name) and still find exactly same pages at new address(that is, in folder with changed name).

No comments:

Post a Comment