Today I am going to tell you my strategy regarding the 301 permanent redirect, Mod rewrite, SEO permalink change and making wordpress a virtual static site. As we all know that search engines like static pages the most and if we can make our WordPress site static to search engines, it will be always helpful for long term search engine benefits.
Making a page virtually static means adding .html extension at the end of the wordpress post and page. Now for wordpress post, the default permalink structure is a dynamic one something like this: http://example.com/?p=123
But I’ll prefer custom structure for posts. My preferred custom structure is: /%category%/%postname%.html or /%postname%.html
Now there are some theories. Some people say that this configuration is resource heavy. why? You might have the same post in more than one category and in this configuration, WordPress needs to choose only a single right category automatically for permalink. This might take eating more resources. Technically this might be right but you can’t notice any major performance issue with this configuration. Some people say a numeric ID in permalink can tune up the performance and thus they prefer http://example.com/2010/07/20/sample-post/ or adding post id after the post name or going by something like http://example.com/archives/123
But my logic is if you write timeless content, then adding date to your post might have adverse effect. People might not be ready to look into a content that is 3-4 years old. So better to go for /%category%/%postname%.html
And if you have one post <-> one category structure (one post in only one category), then it’s not a problem at all.
Now coming to my previous discussion about changing the post permalink structure of WordPress. I prefer /%category%/%postname%.html the most because you can use your keywords in category and post title and by this permalink structure you can place both of them at one go and also make the post looks static by adding .html at the end of the post tile.
Here comes the role of 301 permanent redirect. What is 301 permanent redirect? Suppose you have a WordPress site already live for few years and you have already established backlinks with your old permalink structure and now you need to change it to a new permalink structure. Then in normal way after your change all the URL of your site will be changed to the new one and nobody can find your pages from the old URLs. They’ll get 404 page not found error. Gradually google will deindex the old URLs and again will start to reindex the new URLs. So there is 100% chance that you’ll lose your pagerank and other already established SEO juice to your site.
Don’t worry. 301 permanent redirect is the solution for this. By 301 permalink redirect you’ll never lose any pagerank or SEO juice to your already established site. WordPress has a default .htaccess file on your server root where wordpress is installed. Check if this is already present or not. If yes, then no problem but if not then open a blank notepad document and save it as .htaccess (not as.txt, name it as .htaccess and keep it blank). Upload via FTP to your WordPress root folder and give 777 permission. Now you are done. We’ll go to the next step then.
The next step is changing the existing permalink to the new one as I described. Go to your WordPress admin panel, go to settings and then go to permalinks. Select custom structure and place /%category%/%postname%.html. Now save it. You are done.
The next step is to install two WordPress plugins.
1) Change Permalink Helper by Frank Bültge – It checks the Permalink and redirects to the new URL, if it doesn’t exist. It sends the header message “moved permanently 301″
2) .html on PAGES By IntroSites (So far we have discussed adding .html to posts but this plugin makes your wordpress pages static by adding .html at the end of it)
Activate these two plgins and you are done. You don’t need to do anything else or to write your mod rewrite rules on your .htaccess file manually. Everything will be taken care of by these two plugins. Now your WordPress posts and pages both have .html at the end and these seem static pages to Google now. Your old existing URLs will be automatically redirected to the new URL and you’ll never lose your pagerank and SEO juice. You can see the better result in 15 days.
I’ll also suggest you to look into the in-built duplicate content issue of WordPress. It’s better either to add noindex, follow to categories or tags (any one of them as per your choice) and to archives. If you have All in One SEO plugin installed, you’ll get these options in it’s configuration settings.
I hope now it’s clear to you. I have answered 3 questions here: 1) How to add .html after posts and pages of WordPress 2) How to create SEO permalinks for WordPress 3) How to do 301 permalink redirects without mod rewrite from your old url to new url.