SEO, Adsense Tips And Tricks: Advanced WP SEO Optimization

Pages

Subscribe:

Ads 468x60px

Showing posts with label Advanced WP SEO Optimization. Show all posts
Showing posts with label Advanced WP SEO Optimization. Show all posts

Saturday 20 October 2012

Share

Advanced WP SEO Optimization


There are two aspects to on-site SEO optimization for any site (whether it is a WordPRess, Drupal, Joomla or static web pages):
  1. SEO optimized URLs (permalinks)
  2. HTML semantic structure
  3. Search engine directives / noindex-ing
  4. Internal linking architecture
SEO Optimized URLs (permalinks)
Go to WordPress admin at Settings>Permalinks. Ideally you would have just%postname% for ‘custom structure’ but depending on how you setup your blog that might produce performance problems or not work as expected (conflicts with page URLs). Just make sure you have it in the permalink, even if you have other things like date tags (%year%, %monthnum%, %day%) or %post_id%. You don’t loose much if %postname% is not alone.
For category permalinks I personally always use a category base removal plugin (adapted by myself). That is so you have http://domain.com/catname instead ofhttp://domain.com/category/catname. The change I have made to the existing plugin was to also remove parent categories from the category URL (because I have verbose/deep structure for categories and the URL would become long and not as relevant for the keyword). What I mean is, instead ofhttp://domain.com/catname/subcat1/subcat2 I just havehttp://domain.com/subcat2.
The plugin you can use for this is WP No Category Base.
I will not share the change I have made because it is done in a hackish way and only works well with the specific setup I have. Sometimes I have to adapt it if I change the architecture of links for a site. If you know PHP basically you just have to explode() by “/” the URL before returning it (in the plugin code) and keep just the last segment (the last/actual subcategory permalink).
HTML Semantic Structure
This is where WordPress is shit! 99% of the themes (or more) are complete crap in this area. Even themes that are advertized as SEO-optimized are crap in this area (maybe not 100% crap but more than 50% crap – by ‘crap’ I mean done the wrong way and not optimized).
H1-H6 tags have semantic meaning – they represent titles/subtitles – have more weight for a search engine (H1 most weight, H6 least weight). Usually you use them as subtitles within a post but a lot of themes (99% of them) use H1-H6 tags in other places, mainly the sidebars (as titles for widgets/panels). Also many themes use H1 tag for the blog name/logo in the header. This is bad on-site SEO.
Why is it bad to use H tags for widget/panel titles (in sidebars)?
Because they appear on every page and pollute your keyword relevance with generic words like “Categories”, “Tags”, “Archives”, “Latest posts”. Google may actually have exceptions in their algorithm to take this into consideration during the weighting of the content but you can’t rely on that assumption. That means on a post page where you have a H2 subtitle in the post “Loosing weight is not difficult!” you also have for example 4 panels with H2 as “Categories”, “Tags”, etc. So you end up with diluted relevance for “loosing weight”.
Why is it bad to have the site name/logo as H1?
Because it appears on EVERY page of your site. Hence you either end up having two different H1 tags (one for logo and one for the post title) – which is semantically incorrect (you should have only one H1 per page and you can have multiple H2-H6) or you have the blog name/logo as H1 and actual post title as H2 (lower weight). You only try (maybe) to rank for your blog name with the homepage so having it marked for search engines as being relevant on inner pages (post, category, tag) is bad practice because it dilutes the weight of the keyword that page was targeting.
Tags with and without semantic meaning
DIV and SPAN are HTML tags that have no semantic meaning and have no extra weight/relevance for SE, so use them if you don’t want to give extra weight to the text/content in them. These tags are used by web developers as containers. Difference between DIV and SPAN is that DIV is block-level and SPAN is inline-level (has to do with rendering and CSS). What that means is some content put inside SPAN will appear inline with what was before and what is after it (other inline-level elements are B, STRONG, EM, I, DEL, U, IMG, A, etc. – tags that if you put in a paragraph of text will not add a line-break). DIV is block-level so if you put a word inside a DIV tag it will move it to a new line in the rendered page (other block-level tags are H1-H6, P, BLOCKQUOTE, OL, UL, LI, etc).
So what you should do is edit your theme files so that you make the blog name/logo H1 only for homepage but for any other pages you make it DIV or SPAN (you can use WP conditional tags for this). You could make it DIV/SPAN on all pages and just add a H1 in your homepage with whatever keyword you’re targeting.
Then you have to change those H* tags inside your sidebar. For that you have to edit sidebar.php file in your theme’s folder (and possibly functions.php if the theme is more advanced/intricate). You look for H* tags (generally H2 is used) and replace them with DIV. Now you very likely fucked up the theme (how it looks) so you have to go and adapt the CSS rules (in style.css) for those things so they display correctly. I’m not going to go into details – if you know web development a bit you know what I mean, otherwise you’re stuck and I can’t help you.
What you basically do is:
  • Make single post and pages have the tite within H1
  • Make listing pages (category, tag, archive, etc) have the listing title as H1 (e.g. <h1>Category Name</h1>) and actual post titles rendered from the loop as H2 (e.g <h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>).
  • Have no H1-H6 semantic tags as widget/panel titles in the sidebars or other places on the page that are not the actual content/post. You can have (though really not recommended) H2 tags in the sidebar for example if you have a “Latest posts” listing and H2 would be the post title (not the “Latest posts” widget title).
One step further but overkill
If you want to take this optimization to the top, you’d have to make it so the order of the content in the HTML source code is the one you want (because content and links found first are given a bit more importance than links found last). That means you’d have the actual post content first and the sidebar second and the footer and header last, even though you’d use CSS to render them the usual way. This is advanced shit and frankly implementing it on an existing theme is overkill (can be difficult and time consuming). Also I have reasons to believe that Google now uses more advanced algorithms to detect the various sections of a web page and does not rely on the order of the source code anymore.
Search engine directives / noindex-ing
Canonical URLs
First of all, WP already uses canonical URLs so unless you built a custom theme from scratch or have some very peculiar requirements you don’t have to do anything about canonical URLs.
Search results pages
Unless you’re doing some advanced shit and know what you’re doing, noindex search results pages. Even Google recommends this. You can use search function on sites with lots of pages to do some advanced optimization (by inflating the number of indexed pages) but I won’t go into details now as this has nothing to do with WP optimization.
Even better replace WP search with Google Site Search as it offers better results to your visitors.
Tag pages
One very important thing is to make tag pages noindex. This is easy and there are many ways to do it so I won’t explain any of them but just enumerate some: modify header.php theme file, do a hook for wp_head() inside functions.php, use a plugin (e.g. Headspace2 SEO plugin), etc.
Why would you make the tag pages noindex? Because for most blogs they produce vast amounts of duplicate pages. Ideally you’d have them indexable and you would pay great attention to how and when you use tags so you don’t end up with:
  • Tag pages with just 1-2 posts listed on them (only 1-2 posts were tagged with that term)
  • Tag pages that have same posts as other tag pages (e.g. you have 10 posts and you tagged all of them with both ‘term1′ and ‘term2′ but you used those terms on nothing else).
What happens is the number of indexed pages in search engines decreases (obviously) but SE likes your site more. I know cases where noindex-ing tag pages increased traffic by 300% from Google. I’m not saying this is the norm but if you have lots of tags (a lot more tag pages than content pages) and they produce lots of duplicate content pages, that is bad for you. Again, I stress the fact that having tag pages indexable is good and useful but ONLY if you pay a lot of attetion to the type of listing pages they produce. For most people this is a lot of hassle so it is better to just noindex them.
Category pages
If you don’t use categories as they were intended but more like tags you end up in same problem as described above. Obvioulsy keep category pages indexable but make sure you don’t “spam” with tens or hundreds of categories that each have only a few posts in them.
Archive pages
You can noindex them in most cases or just make sure you have no archive-type links from sidebar, post date or other places. Unless you have a multi-user blog with lots of users that post lots of content in lots of categories, you end up with archive pages being kinda duplicate content. On top of that they dilute your internal linking anchor relevance (alongside the keywords you’re targeting you have anchors like “2001″, “December 2011″, etc). At most you should have a yearly or monthly (worst case) archive. Under no circumstances should you let google index day archives because unless you have a blog where you make more than 5 posts/day, you end up with lots of tiny, shitty, spammy pages.
Any other type of archive/listing page (e.g. author) should be noindex, or even better have NO LINKS pointing to it so SE don’t know it exists.
Internal linking architecture
Better homepage link
In the header navigation if you have a “home” link, make it n0follow. Add a d0follow link towards the homepage in the footer and instead of “home” use the actual keyword the homepage is targeting. Ideally you would not do this but instead have no “home” labeled link and use the keyword in the header navbar for the home link. However lots of people find it good user experience to have a “home” link in case they get a bit lost or something (in practice many people don’t know they can click on the logo to go to homepage).
Remove polluting links
I was telling you to noindex tag pages and other types of pages. This is the other side of the coin. Remove completely any links from your site towards such pages you don’t want SE to find. You can keep tag links if you think they add to the user experience (but noindex tag pages as I’ve said previously) but just eliminate archive/date links from the sidebar. Maybe if you have issues with SE finding all your pages, keep an archive page (not panel in sidebar) and link to it with ONE SINGLE link from the footer from the homepage ONLY (not from other pages).
Also you have to go and modify your theme files so that you don’t have the post author and date (everywhere they appear) as links but as regular text (otherise you still end up with SE indexing those unimportant pages).
Have a good category structure
What i mean is “silo” type structure. This is not the perfect structure for any type of site, so use common sense in choosing if to use it or not.
Frankly, I think a solid category structure and silo-type internal linking is the most overlooked beneficial on-site SEO thing you can do. This is because by using this you can cluster keyword families (organize your site as highly relevant topical hubs around keyword families).
Remove useless widgets/panels
Any panel/widget that doesn’t improve user experience, the SEO or is redundant in terms of SEO should be eliminated. That means tag cloud (if it wasn’t obvious by now tags are evil), archive links, recent posts, latest comments and crap like that. If you want to have archives, you can have them as a dropdown box and it won’t affect your SEO.
If you don’t have the latest posts listed on homepage, use a latest posts plugin but just on the homepage or just in one page that gets crawled often (to help with indexing the latest posts you make).
Plugins I recommend
I use very few plugins, but some that I recommend are:
HeadSpace2 (no I do not like All-in-One SEO or the others and I do NOT use this one either because I usually have my own hardcoded SEO so don’t need a plugin for this)
Contact Form 7
WP No Category Base
SEO Auto Links & Related Posts (only on certain types of sites, I recommend to do this interlinking manually for important sites)
I’m not saying they are the best, they’re just the ones I have used. I’m not staying very up to date so there might be better ones.
By the way don’t use plugins just because they exist. If you don’t see a good reason to use it, if it doesn’t improve SEO or user experience, then don’t install it. Also lots of SEO plugins are actually bad for SEO (imagine that). You may end up with a very empty sidebar which is again not good, so just use someSEO-insignifiant plugins/panels/whatever to make the page look better (not so thin).
Plugins can be dangerous. I’ve seen folks who took control over tens of thousands of sites using WP plugins that they built with trojans/backdoors in them. There is no way for you to know this unless you are good with PHP and can read and understand the plugin code, so just always make sure you install plugins hosted on wordpress.org plugin repository. Chances for a plugin from wordpress.org to be dangerous are smaller.