Free OnSite SEO Offline Tool

Recently we revamped our company’s website We dropped our Rails based CMS and in favour to use the static site generator Jekyll. Jekyll gives us a great flexibility and extensibility, while the site load gets blazing fast. Not only the asset management with support for less and coffee script is a big win, we were able to implement all missing pieces quickly. E.g. we created new liquid template tags for email obfuscating, google analytics, or youtube video.

So the page was done. Now we need publicity, reputation and SEO – everyone needs SEO. While the OffSite SEO with all the back links, social media and other authorities is a very difficult topic, we could do some homework on OnPage SEO. OnPage SEO evaluates your single page and gives you some recommendations how to improve your page. Some rules are:

  • Have only one h1 heading
  • Write keywords and description in your HTML header
  • All images should have an alt attribute
  • title and h1 header should be different
  • All internal links to anchors should be valid
  • Text to HTML markup ratio should be high

There are many online SEO services out there like where you can check one page for free or pay a lot to get a full report. This was not an option. Back to DIY work. Validating OnPage SEO for one page is fine. However, having more than 30 pages this work is very time consuming. Further, manual work is fragile, error-prone and regress-prone. Why not doing this by a computer program?

Unfortunately, we did not find any appropriate offline tool which can crawl your site and gives some improvement suggestions for all our pages (if you know any, please leave a comment). A small afternoon hack later a little tool called OnSite SEO was born.

OnSite SEO is a tool to crawl, inspect and score your site offline. It inspects each page and extracts some key properties such meta information, headers, resources and text. These properties are scored by a list of different rating functions to give a final score of your page. Also you can validating links, check images and do other arbitrary calculations, if you know javascript. The tool is based on nodejs, phantomjs, jQuery, and angularjs.


Since it is Christmas time we published this tool for free! Download, use, fork and extend the OnSite SEO tool from GitHub or visit the demo page.

We wish you a SEO Christmas and a happy new year 2014!

Repairing a broken grub.conf in CentOS

Today I got an error during updating Hyper-V kernel modules on CentOS 6.3. The upgrading process removes the already loaded kernel modules in a running system. This results in a kernel oops and a broken init ramdisk for the currently running kernel. Sometimes it happens that a kernel oops occures during writing the new grub configuration. On the next boot grub cannot find any configuration files and falls back to the grub shell. You will get a prompt like this:

grub >

Experts will be able to boot the system typing the commands for grub directly in the prompt and boot the system manually. But if you entered the lines and the system is up and running again, you won’t find any grub configuration.

On CentOS you are not able to generate a grub configuration from scratch via any scripts or tools like the Debian update-grub. CentOS itself uses grubby to generate the kernel entries. But grubby needs a template from which it can generate the entries. Last but not least this template will be generated by reading an existing grub entry. This approach ends up in a worst case scenario if you have misconfigured your /boot/grub/grub.conf, /etc/grub.conf or /boot/grub/menu.lst (the both last entries are only symlinks to /boot/grub/grub.conf) and you now try to reset your configuration. And again big trouble, if generating the grub.conf failed – for example during a kernel crash. In my situation it was a kernel crash.

It is absolutely impossible to regenerate a grub.conf from scratch with any of the tools delivered by CentOS. My solution:

  1. boot your system via Install-Disk or by grub command line prompt
  2. create an empty new /boot/grub/grub.conf
  3. add the next code snippet to your grub.conf
title CentOS (2.6.32-279.22.1.el6.x86_64)
  root (hd0,0)
  kernel /vmlinuz-2.6.32-279.22.1.el6.x86_64 ro root=/dev/sda3
  initrd /initramfs-2.6.32-279.22.1.el6.x86_64.img

N O T E:
I have a separated /boot partition on my systems. In standard configuration delivered by CentOS /boot and / will be on the same partition. In this case, the path to kernel and initrd will start with /boot/vmlinuz... and /boot/initramfs... . The root partition mostly will be root=/dev/sda1.

Try to boot your system with your manually built grub.conf. If anything works fine you can add new boot entries by CentOS’ tool grubby. For example:

root@host:~ $ grubby --add-kernel="/boot/vmlinuz-2.6.32-279.22.1.el6.x86_64"\
--title="CentOS (2.6.32-279.22.1.el6.x86_64)" --copy-default --make-default

The tool grubby will replace the /dev/sda? device file with the UUID string of the partition.
You can use the next line to generate an entry for each kernel image in /boot/:

for kernel in /boot/vmlinuz-*; do \
version=`echo $kernel | awk -F'vmlinuz-' '{print $NF}'`; \
grubby --add-kernel="/boot/vmlinuz-${version}" \
--initrd="/boot/initramfs-${version}.img" \
--title="CentOS (${version})" \
--copy-default --make-default; \

You should check the /etc/grub.conf for duplicate entries or maybe you will resort the boot order. Reboot your system to check if anything works fine again.