Blog SEO: optimizing URLs and title tags
In the past newsletter (issue no. 33) I told you about a study that shows us the unimportance of keywords in URLs. I went a step further and compared WordPress blog pages with junk site generator pages, because both are usually using the same way to create the title, heading, link and the URL of a page. (If you can�t remember, read the last newsletter).
Today I want to show you how you can improve your WordPress blog and make it different from junk site generator pages regarding these 4 elements: the link to a page, the heading, the title tag and the URL (permalink) of a page on your WordPress blog.
First of all, if you are building WordPress blogs for SEO, you should use a search engine optimized layout, such as one of my SEO WordPress themes which I have recently updated.
Now, let�s start with the URL. Without any configuration, a WordPress blog usually has dynamic URLs ( f.ex.: http://www.site.com/blog/?p=28 ). In the past, search engine spiders were not able to crawl sites with dynamic pages and that�s why we have been told to use Apache rewrite to create search engine friendly URLs of our blog pages. In your WP admin panel, you can select different options to create these permalinks.
Today, search engines can fully index a blog with dynamic URLs. Hence, you could as well leave the default dynamic link structure intact.
However, short permalinks still look better and are more user-friendly than dynamic URLs. To create the permalinks, most WordPress users choose the date and post title format which creates very long URLs. As we don�t want to over-use the title of a blog post, I recommend you use the post ID in your permalinks, either alone or in combination with the category name (my favorite choice).
/%post_id%
/%category%/%post_id%
To update the permalink structure, login to your blog�s admin panel, go to “Options » Permalinks” and enter either of the above options into the “Custom structure” field, then hit the update button.
With the category / post_id option, the URL of an individual post will look like this: http://www.learnaboutnutrition.com/diets/22
Next, we�re going to do something to slightly improve the category URLs. With both of the above permanent link structures, the URL of a category�s index page looks something like this: http://www.site.com/blog/category/category-name
If you are trying to rank well with a category index page for a medium competitive keyphrase , you would normally use the keyphrase as the category name. But then, this would put all the keywords in the URL. For example:
The keyphrase “weight loss diets” used as category name would usually create the URL: http://www.learnaboutnutrition.com/category/weight-loss-diets/
You can shorten the URL and remove some of the keywords by simply creating a “category slug” for each category. This option is only available after you have added the category. Go to “Manage » Categories”, click on the “Edit” link beside the category name and then you will see the additional field “Category slug”. In the above example, I entered “diets” as category slug and the URL of this category page now is: http://www.learnaboutnutrition.com/category/diets/
That�s as far as the permalink structure is concerned. Next, we want to take a look at the links to your blog posts and the individual posts� headings. Well, there�s not much you can do about these. For the link, WordPress uses a post�s title as anchor text. For the H1 heading, the post�s title is used as well. So, let�s leave these two as they are and care about the next element:
The TITLE tag of a page. My favorite code for the title tag is currently the following:
The beauty of this code is that it uses the post slug to create the title of a single post�s page. So, if I want to make the content of the TITLE tag different from the H1 heading, I simply create a post slug which is different from the post�s title. Remember, the post slug is usually meant to be used instead of a post�s title in the permalink structure, but since I am now using only the post ID in the URL, I can use the post slug for a different purpose. The post slug can be added when writing / editing a post.
For example: say, I want to target the low competitive keyphrase “tanning bed installer needed” and write a blog post about it, then I would write a short article with a title like:
“How to find installers for tanning beds in your local area”
Remember, this will be used as H1 heading for the page. As post slug, I would use the keyphrase itself (”tanning bed installer needed”), so the TITLE of the page using the above PHP code would become:
Archive » tanning bed installer needed
What about the posts that don�t have a post slug specified? Well - for those, the post title will be used instead.
Applying these techniques will make 3 out of the 4 elements (link, title, heading, URL) more different from each other and your blog more search engine friendly. Only the anchor text in the link to a single post and its heading will be the same.









Comment by Chris Bradley
Hi Guido, i tried to use the code from above but it didnt work for me, i kept getting an error. here it is how i copied it..
Archive » post_name); } else { bloginfo(’name’); wp_title(); }?>
so not sure if something is a bit out of place or not.
thanks again,
chris
PS- once again, great stuff!
Comment by Chris Bradley
i know have a new question, i just updated the permalink structure but now my blog posts get page not found errors, is there something i should do to make sure my current and past blog posts get corrected?
Thanks,
Chris
Comment by Chris Bradley
i pasted the wrong code on my first reply…
Archive » post_name); } else { bloginfo(’name’); wp_title(); }?>
Comment by Chris Bradley
ok, it appears i did paste the right code but for some reason its not showing up correctly, i pasted the exact code from above in your article and both lines. not sure why it the first line didnt take in my post here.
chris
Comment by admin
Chris,
first: my apologies - I noticed that the double and single quotation marks in the code had been displayed by WP as curly quotes instead of straight ones. This has been the cause for the error.
I´ve corrected it and now it works fine.
One tip for pasting code into your comments: if you want to show the code as it appears in your text editor, you need to escape all the special characters, especially those that are part of HTML / PHP code:
< — <
> — >
" — "
' — '
Heck, and if you want to display the code of a character entity in your comment, you even need to escape the ampersand:
" — &quot;
Comment by Tom
Thanks Guido, I also had the problem Cris had - I will try it again now.