Posts Tagged ‘blog seo’

How to Change the Permalink Structure of a Blog Without Losing Rankings in Search Engines

Friday, August 1st, 2008

More often than not, blog owners who are working independently and may not know advanced SEO (Search Engine Optimization) techniques will try new things with their blogs which could end up hurting their rankings and it can get confusing.

half moon

Last night I decided to make some much needed changes to ‘The Wpromoter blog’ to help increase our rankings in the search engines. As we’ve been diligently writing blog posts and doing our best to keep the world informed, we’ve accumulated a rather large number of posts while the blog has been enjoyed by our readers.

When the blog was added to our site, it was done after our website was created programmatically. The blog is a WordPress installation in a subdirectory called /blog.

Before I begin explaining what I’ve done, here is an Example scenario:

Joe Blogger Dude has a blog running on his own installation of WordPress called joeblogger.com -now this isn’t a real blog and if you go there you will see this: Joe Blogger

For our example, his URLs currently display in this format:

http://www.joeblogger.com/%year%/%month%/%day%/%postname%/

ie. live it could look something like this:
http://www.joeblogger.com/2008/08/01/how-to-joe-blog/

After Joe visited an event somewhere such as SMX he found some information about blog SEO that influenced him to use a custom blog structure in WordPress for his URLs instead of the longer default one with all the date stamps in the URL - which are really only useful for news posts that you want indexed in Yahoo’s News section or other news sites which require the date to be in the URL to be indexed (but that’s a whole other post to write about).

Joe had the default setup when he started by simply following the installation instructions for WordPress that don’t include any information about SEO techniques for blog optimization.

Here’s the problem

Now Joe has the ammunition of wanting to change his permalink structure somehow, so he Google’s ‘How do I change my Permalink Structure in WordPress?’

After some quick research he finds out that the way to do it is in the ‘wp-admin’ area where you choose ‘Settings - > Permalink’ and choose the radio button for ‘Custom’ and then enter the following string in:

/%category%/%postname%/

This will now replace the dates in the URL after the domain name with the category of the post in EACH post and then the post-slug (postname).

So, Joe sets it up and everything works great, now his posts have much cleaner URLs. He’s very happy.

The ‘problem’ I mentioned is right here: He doesn’t realize that any of his posts that were ranking in Google will now return a 404 error and eventually drop from the SERPs (Search Engine Results Pages).

So what do you do to KEEP your rankings?

The answer most SEOs will tell you is to 301 redirect all your old blog posts to the new ones.

Great.

Guess what? Joe Blogger had 250 blog posts.

WHAT a laborious task this has now become.

http://www.cs.princeton.edu/gfx/proj/sugcon/models/brain.pngTo manually create all those 301s is a real pain in the ass. You need some programmatic or software or quick and dirty solution to do this much faster.

There are plugins and ways to achieve the results, just use your brain a bit to figure it out.

My next example is what I did to solve this issue for ‘The Wpromoter blog’ that you are reading now. Our posts used to look like this:

http://www.wpromote.com/blog/2008/07/31/information-age-overload/

Now they look like this:

http://www.wpromote.com/blog/internet-news/information-age-overload/

TRY CLICKING ON THE /2008/07/31 POST AND SEE THE 301 IN ACTION!

Step 1)

Install the XML Sitemap Generator Plugin in your WordPress Blog.

- (note: if you use other blog software, all of these principles will be the same, you may have to find another way to generate the URLs, or just use an online sitemap generator)

Step 2)

Generate a sitemap file for the blog and view the sitemap it creates.

Save the sitemap locally on your computer as ‘old-sitemap.xml’.

generated old sitemap
Plugin-Generated ‘old’ Sitemap

Step 3)

Open the file in an editor (i.e. TextEdit, Notepad, Smultron, Dreamweaver)

Use various find and replace techniques to strip out just the URLs for each post.

i.e. search for: </url><url> ignoring whitespace, then <loc>, then </loc> replacing them all with an empty character to remove them. - Simply end up with a list of URLs.

Step 4)

Temporarily block the search engines from indexing your blog while you make the changes:

How to prevent search engines from crawling your blog
How to prevent search engines from crawling your blog

Step 5)

Setup the Custom Permalink Structure in WordPress

In WordPress, go to:

‘Settings - > Permalink’ and choose the radio button for ‘Custom’ and then enter the following string in:

/%category%/%postname%/

WordPress custom permalink structure
WordPress custom permalink structure

Now you will see right away that your post URLs look much cleaner. Check to make sure that this works by looking at your blog and going through several pages to make sure it worked.

i.e. they now look like this.

http://www.wpromote.com/blog/technology/information-age-overload/

Step 6)

Generate another sitemap for the ‘New’ Url structure.

Follow the same steps as above in step 2.

new sitemap generator URLs

New sitemap generator URLs

Step 7)

Cut and past the two files into EXCEL in different columns.

i.e. column A will read: Redirect 301, column B will be the OLD URLS, column C will be the NEW URLS.

301 redirects in excel

301 Redirects Created in Excel

Step 8 )

Cut and paste from Excel into your Text Editor

Save the file as UTF-8 encoding.

This will be either added to your current .htaccess file (if there’s anything already in the file, leave one blank line and paste these redirects) or create a new one. Note on MACs you’ll have to name the file htaccess.txt or something readable, just rename it .htaccess after you have uploaded it to the root of the blog directory - i.e. in our case /blog

Step 9)

WAIT if you have a sitemap already with the ‘Old URLs’ until Google crawls it.

You need to allow google some time to crawl and index the 301s. IMPORTANT NOTE: You will know that this has occured when searches on posts that were indexed in the old URLs start showing up as the new URLs.

One way to speed up the process is to submit an XML sitemap (via Webmaster Tools) to Google that contains the old URLs. Then, WAIT until everything has been crawled.

Step 10)

Enable Search Engines to Crawl your site again.

Now come back to the Privacy Settings page and Click the top radio button allowing the blog to be indexed by the Search Engines again.

How to prevent search engines from crawling your blog

Step 11)

Submit NEW URLs in the sitemap after they have been crawled.

Once none of the older pages are showing up for searches on blog content from the posts, you will want to update your XML sitemap with ONLY the NEW URLs.

Step 12)

Be aware of Duplicate Content issues.

To ensure that none of the archive posts get dinged by Google as ‘duplicate content’, I activated the ‘Duplicate Content Cure’ plugin in WordPress which adds the Meta ‘NOINDEX’ tag to all the archive pages that contain the same content as the blog posts, but have a different URL. This tells the search engines not to index any of the archive pages(with less human friendly URLs) and ensures only posts in the proper format get indexed.

Step 13)

Sit back and wait for the new rankings to start rolling in!

Till next time,

Your Friendly Neighborhood SEO

How to Write Blog Posts that Rank Well in Search Engines

Thursday, May 15th, 2008

More than you may realize, these days many of the blogs you read are actually written for one purpose.

Search Engine Rankings

Often a writer will be given a keyword phrase such as ‘Blog Search Rankings‘ and be told to write a 500-700 word post about that. The sole purpose of this is to help their site rank higher for that search term. The only real way to improve rankings and this is the kicker: is to build great sites.

So, while choosing interesting topics to write about may seem like a better idea than writing about the sites main keywords, the very best way to do this is to write something interesting that ties back into the primary search phrase you wish to rank for.

So for example, if you wanted to write about ‘Blog Search Rankings’ as this post is mainly focused on, my approach in this article that you are reading is to be ‘helpful’ in some manner. It is a ‘how to’ style post that describes something useful that a reader may actually use.

On that note Musical Note here are some ‘how to tips’ for blog writing that will help with your search engine rankings.

H1 tags

After you post your blog, in FireFox press either ‘Control-U’ or ‘Command-U’ to view the source. Older IE6 or other browser users may need to use the dropdown menu and select ‘View Source’. If your blogging software is configured correctly, hopefully the title of your post will be in an H1 tag. If it isn’t you may consider editing some of your preferences to make this so. The key about H1s is that you should only have ONE per page that highlights the most important keyword phrase for that page. For this post the only H1 tag you will find that is actually rendered is the one surrounding ‘How to Write Blog Posts that Rank Well in Search Engines’ at the top of this post.

H2, H3, H4 tags. - Any sub headings should be surrounded by H2 tags, and tertiary levels of headings should be H3, H4, etc. the further you go indenting. You can use your style sheets to determine what the respective heading will look like.

For example you could put:

<H2 class=”header-2-style”>

if you have a class called ‘.header-2-style’ predefined in your stylesheet.

This is something you can easily do while posting your piece and doesn’t have to be done later by some ‘SEO Expert’.

Link Titles, Title & Alt Attributes for Images

As many of you may already know, when you mouseover an image sometimes descriptive text will be displayed. This is from the ‘alt’ attribute in the <img> tag. More less widespread is the use of a ‘title’ attribute within the <img> tag.

i.e. <img src=”http://www.wpromote.com/affiliates/wpromote.jpg” title=”The Wpromote Logo” alt=”Wpromote Logo”>

Notice how there are both a title and an alt description. These serve two purposes…the title is for google and the alt is for the user who mouses over the image and gets a description.

For Hyperlinks the same concept of a title applies and not many people would ever think to do this intuitively. This is what you should use:

<a href=”http://www.wpromote.com” title=”Wpromote PPC Management Experts” target=”_blank”>Wpromote PPC Management</a>

Every link on your site should have a title. The title tells Google what your links are and will help with your rankings. Now if you want to hyperlink the image above to go to the site in the link example above…it may seem like a lot but this is really what you should put in the source code:

<a href=”http://www.wpromote.com” title=”Wpromote PPC Management Experts” target=”_blank”><img src=”http://www.wpromote.com/affiliates/wpromote.jpg” title=”The Wpromote Logo” alt=”Wpromote Logo”></a>

Here is the same example rendered:
Wpromote Logo

Other Tips

If you use WordPress (I am currently using WordPress to edit this post) depending on which SEO(Search Engine Optimization) related plugins you use there will be options to create custom titles etc. If you use the ‘SEO Title Tag’ plugin from NetConcepts then you will have that option - i’d suggest cutting and pasting the post title in the ‘Title Tag’ field that appears AFTER the post when this plugin is turned on.

Tags

Be sure to add keywords that are in your post to the ‘Tags’ section in WordPress right after the post content section. examples: for this post I will include: Seo Title Tag Plugin, Title Tag Plugin, Blog Seo, Blog Search Rankings, Search Engine Optimization, SEO, Wpromote and others. Try to put at least 5 tags in the tag section that are found in your post if possible.

Categories

Make sure you select an appropriate category for your blog post. If you don’t have one in your category list, then simply add one that makes sense and is ‘relevant’ (That word again) to your blog post. You can select more than one category if it applies, for this post I chose, SEO, Internet News and Wpromote. I noticed that there is no ‘blogging’ category so I created one and added it to that as well.

We’re Almost Done!

At the bottom of the page below the blog content post section below the tags and categories is an area for Advanced Options.
Under ‘Excerpt’ here is where you will write the description that comes up in the Google search engines when that post comes up for a result. The average length is 160 characters. You want 2-3 sentences that describe the contents of that specific post and preferable have the main keyword phrases for that page closer to the beginning of the description.

This is VERY important, more important than the link titles (which people never seem to take the time to do, thus making it easier to outrank their sites) and is almost as important as the Title tag for the page.

-Till next time