SEO Tips for MODx - The Best SEO Friendly CMS

SEO Tips for MODx – The Best SEO Friendly CMS

SEO Tips for MODx – The Best SEO Friendly CMS

Why MODX is The Best SEO Friendly CMS?

MODx is arguably one of the best SEO focused CMS out there. What makes it different is that you do not need to make theme alterations to make a site perform well, nor do you require plugins. It’s summed up best by the MODx team and holds true:

MODX allows you to control 100% of what is output with virtually no effort. Unlike other systems that require learning complex theming engines, in MODX you work with HTML and as many custom variables for the site you need. It takes minutes to build a site that performs amazingly well in Search Engines and because site builders are in total control and can change the output at any time, making tweaks is just a few clicks away.

MODx continues to get better and better with each new version that’s released and it’s no surprise it’s gaining so much popularity. There is definitely a bit of a learning curve to get started but it’s a great system all around.

How to Make MODx More SEO Friendly?

Content

This is the most important part of SEO factor. Each of the web pages must contain enough words that can be indexed by search engines. So at the time of searching, prospective customers can be refered to the pages that have the most related contents to their keywords.

Probably some pages are intended to not having many words, like photo gallery, but not blogging. So blogging has an important value to the websites to make them positioned in better rankings on the search engines. If it exists, the content editor should keep using the same keywords on the page several times, may be by doing re-editing back after he/she finishes the article.

These are the key factors for this topic:

  • Cq: Content Quality
  • Cr: Content Research / Keyword Research
  • Cw: Content Words / Use Of Keywords
  • Ce: Content Engagement
  • Cf: Content Freshness

HTML Code & Templating

So, how come templating become important?

  1. People, page layout templating matters! Web designer should try to not put any ads on top of the page. At least not the excesive one.
  2. Create a good page structure.

Ht: HTML Title Tag & Hd: The Meta Description Tag

Why not using better descriptive words for Title and Description tags?

These tags will help users to figure out quickly what the page is about.

So, this is a good practice when creating the basic template for MODX:

<html>
    <head>
        <title>[ [*longtitle:notempty=`[ [*longtitle]]`:default=`[ [*pagetitle]]`]]</title>
        <meta name="description" content="[ [*description:notempty=`[ [*description]]`:default=`Just dump of general description here`]]" />

If you’re a MODX’s new comer, I’m using the MODX’s Output Modifier here. Basically it says, “if longtitle is not empty, then use it, else use the default which is the pagetitle”. The pagetitle is a mandatory field for MODX’s resource, so it will be there.

The description have to be unique for each page. It adds wider explanation about the content which can not be represented in the title.

Hh: Header Tags

For the Header tag, use them in appropiate manners. H1 is the most important tag and usually it describes the whole keywords for that particular page. The web designer can use multiple H1 tags for a page, but it might be better to only use this once.

That said, while the resources usually have H1 tags for the page title of each page, the web developer should use H2 for the titles in the template chunk when collecting them using getResources or renderResources.

HTML errors

HTML error doesn’t have a direct impact to the search engine’s rankings, but indeed if the error brokes several, if not all, parts of the page.

This is an example of a common error.

MODX developers must have been using getResources to retrieve several resources (web pages), like news, or latest articles.

In many cases, this is the code:

[ [!getPage?
    &elementClass=`modSnippet`
    &element=`getResources`
 
    &parents=`17`
    &depth=`2`
    &limit=`10`
    &pageVarKey=`page`
 
    &includeTVs=`1`
    &includeContent=`1`
 
    &tpl=`blogListPost`
]]
<div class="paging">
    <ul class="pageList">
       [ [!+page.nav]]
    </ul>
</div>

and the chunk blogListPost:

<div class="blogPost">
    <div class="date">[ [+publishedon:strtotime:date=`%b %d %Y`]]</div>
        <h2><a href="[ [~[ [+id]]]]" title="[ [+pagetitle]]">[ [+pagetitle]]</a></h2>

        <p class="author"><strong>Author:</strong> <span class="author">[ [+createdby:userinfo=`username`]]</span></p>
        <p class="summary">[ [+content:ellipsis=`200`]]</p>
        <p class="readmore"><a href="[ [~[ [+id]]]]"><span>Read more</span></a></p>

        <div class="clear"></div>
    </div>
<hr/>

There is a hiccup on this code: [[+content:ellipsis=`200`]] (this is different with MODX’s example which is using [[+introtext]]).

This output modifier cuts off the content after 200 characters, leaving the retrieved HTML body missing the proper closing HTML tags. What will happen if the unclosed tag is the a (link)? The rest of the texts become a link.

I had this situation before, and my solution was by creating another custom modifier using php tidy feature:

[ [+content:ellipsis=`200`:strip_tags=`<p><br>`:phptidyModifier]]

I lent the PHP Tidy plugin’s properties, and created the phptidyModifier snippet as below:

<?php

// Specify configuration
function fixJson(array $array) {
    $fixed = array();
    foreach ($array as $k => $v) {
        $fixed[] = array(
            'name' => $v['name'],
            'desc' => $v['desc'],
            'type' => $v['xtype'],
            'options' => empty($v['options']) ? '' : $v['options'],
            'value' => $v['value'],
            'lexicon' => $v['lexicon'],
        );
    }
    return $fixed;
}

ob_start();
include $modx->getOption('core_path') . 'components/phptidy/elements/plugins/phptidy.plugin.default.properties.js';
$json = ob_get_contents();
ob_end_clean();

$properties = $modx->fromJSON($json);
$properties = fixJson($properties);
$defaultProperties = array();
foreach ($properties as $k => $v) {
    $defaultProperties[$v['name']] = $v['value'];
}

// Set non-default configs
$tidyConfig = array();
foreach ($defaultProperties as $k => $v) {
    if ($k === 'css-prefix'
            || $k === 'language'
            || $k === 'slide-style'
    ) {
        continue;
    }
    // convert boolean strings (by a generated drop down options) to be uhm... boolean.
    $v = (strtolower($v) === "true" || strtolower($v) === "yes" || strtolower($v) === "1") ? 1 : $v;
    $v = (strtolower($v) === "false" || strtolower($v) === "no" || strtolower($v) === "0") ? 0 : $v;
    $tidyConfig[$k] = $v;
    $tidyConfig['show-body-only'] = 1;
    $tidyConfig['preserve-entities'] = 1;
}

// Tidy
$tidy = new tidy;
$tidy->parseString($input, $tidyConfig);
$tidy->cleanRepair();

if ($tidy->errorBuffer) {
    $errorBuffer = "There are some errors!\n";
    $errors = explode("\n", $tidy->errorBuffer);
    foreach ($errors as $error) {
        $errorBuffer .= $error . "\n";
    }
    $modx->log(modX::LOG_LEVEL_ERROR, $errorBuffer);
}

return $tidy;

I used PHP Tidy because it automatically fixes any HTML’s syntax errors. If anyone want to use this too, I recommend another further reading about its complete configs.

The bottom line is that the web developers must be sure that the HTML codes are correct from top to bottom, left to right, in the individual page or in the parent page.

Site Architecture

Ac: Site Crawlability

First of all, do not use javascript or flash for navigation links. Or at least try to use it as an unobstrusive javascript.

Web developer should also provide 2 (two) kind of sitemaps, one for human (in HTML) , one for search engines (in XML). Most of the search engines refer the sitemap.xml format to http://www.sitemaps.org/.

To create sitemap.xml in MODX, we have 2 options:

  • using GoogleSiteMap snippet, or
  • using getResources with its Google XML template.

I prefer the second option, because any web editors can set the changefreq and the priority through Template Variables for it.

Again, please remember to use output modifier to escape the HTML entities, like changing the ‘&’ to ‘&amp;’.

Another important thing is the Robots.txt. Web developers should be aware that search engines read that. So they have to be sure that the robots.txt does not block the webspider bots to crawl the website.

To speed up a new site being indexed by search engines, the web developers can register them to Google Webmaster Tools or Bing Webmaster Center Tools.

As: Site Speed

Oh, well, with MODX Revolution, how fast can you go?

  • New for 2.2.1: the web developers can use session-less contexts. Bear in mind, this is intended for single user’s websites,
  • Cache everything,
  • Use minifier and gzip for CSS and JS files.

Au: Are Your URLs Descriptive?

Website should have the Friendly URL. It is important to have human readable URL address. It adds another relevancy value to the search engines on measuring the user’s keywords and the web page, including the site’s URL. It’ll be hard to gain the SEO’s advantage if the site has index.php?id=1 for the URL, and/or use canonical link element in the MODX’s template if the site uses more URL parameters on purpose.

Link Building

Now, we start talking about the “Off the Page” rangking factors.

Google interprets a link from page A to page B as a vote, by page A, for page B. While naturally it will be better if the link comes from elsewhere, internal linking is also applicable as an SEO practice.

For this website, I apply it by adding “Related Articles” or “Latest Articles” to each blog page using getResources.

Lq: Link Quality

It’s about getting link for a respectable website to our website. Link on comments is only valued small weight to the SEO rangking. Getting linked by the V1a-gr4 websites makes it different.

Lt: Link Text / Anchor Text

It’s about the text inside the link. It adds the relevancy of the anchor text to the website.

So using “click here” kind of anchor text will not help.

Ln: Number Of Links

Having a lot of backlinks is good. Having the spammy ones is not.

Social Media

As I’ve mentioned above on the “Social Network’s Impact” section, social media brings a new rule to the SEO games. It boosts up the incoming visitors number because the link is shared, tweeted, or liked. There are several different comments by the engineers of how their machines react to this social signal. But it can not be denied that all of them are taking a race to build a real-time index.

The key factors of this chapter are:

  • Sr: Social Reputation
  • Ss: Social Shares

It’s a good idea if the web developer adds a social bookmarking to the web page. While the tweets are fading away in minutes, this social bookmark stays to remind new readers after a period of time. Because basically it is a static HTML, MODX developers can add the social bookmark script as a MODX’s chunk or template.

Personalization

Each of search engines gives different result. That is because of the personalization of user experience and geo-location factors. You might be interested to try the Rank Checker tool from seobook.com.

Pc: What Country?

Search engines detect IP of the user’s computer. So if the website is made for a specific target market outside of the original country, webmasters can try to host it on a server in that particular country.

Pl: What City Or Locality?

Some websites need to be more precise on spotting smaller region targets. Let’s say the real estate websites. They contain addresses and phones for contacts.

For this job, it’s better to use Template Variables for the house’s detail Template to implement one or all of the options of geo-location targeting, such as:

  • microformats hCard
  • Facebook’s Open Graph Protocol
  • html5’s address tag

Ph: Personal History

To get the idea about the user experience factor, you can try to log in to any search engine’s service, then refresh the search result. You’ll notice that the results will be adjusted to the previous records of the your behaviors in their entire services.

Ps: Personal Social Connections

This is again connected to the “Social Media”.

Violations

Now, we start the negative signals. These are penalties, so they can drag down in relative numbers of the website’s rangkings.

Vt: “Thin” or “Shallow” Content

Honestly, I’m not quite sure about this particular topic.

  • How does google determine the quality of the content?
  • How does it do with non-English websites?
  • How does it go with scientific formula websites?

This is the Google Panda’s update. So basically, the machine tries to determine the quality of the page content for the human and throws the bad ones.

Vs: Keyword Stuffing

Don’t think too much about meta keywords. Some search engines might measure it, but Google does not. It’s been a bad practice for a long time that webmasters spammed the keywords tag with non-related words to the web page, just to get higher rankings. For a positive reason, some of the SEO experts still do this for those other-than-Google search engines.

If the web developer keeps using it, he/she is better to use it wisely. Don’t repeat too many words, or even for the misspelings.

There are keyword tools that have been used to analyze keyword’s statistics:

  • Google Keyword Tool is designed for Google AdWords to be used for websites that are using Google AdSense advertising.
  • Bing Keyword Research Tool is designed for Microsoft AdCenter to be advertised on Bing and Yahoo! Search.

Vh: Hidden Text

Web developers should not try to cheat search engines by putting keywords inside a hidden area. Search engines will sink the website’s rankings.

Vc: Cloaking

Cloaking is an attempt to provide different contents between human and the search engines using redirects.

Some people use the spiderbot’s IP Address detection, or User-Agent HTTP header, then refer them to a different page.

Matt Cutts says, “don’t do it”.

Vp: Paid Links

Webmaster should not buy services that offer backlinks. When search engines catch it, not only the website’s rankings will be sank, it can be banned!

Vl: Link Spam

Well, anyone can put a specific page on the comments for a reference, but spamming it with links is a bad idea.

Blocking

Bp: Personal Blocking

User can block a site from more appearance if he/she blocks the result’s link.

Bt: Trust Blocking

If there are many users block it too, then the systems will start to analyze it as the same.

Multilingual Websites

You might have been using Babel add-on for this. At the time of writing, Babel is the best option for MODX Revolution to do the multilingual site. It handles the easy switching between different languages to edit the content. To make the best way to apply the Friendly URL with it, here is the tutorial to do the SEO Friendly Multilingual Websites with MODx and Babel.

Posted in Windows Hosting and tagged , , , , , , , , .