Use Google Search Console to optimize your Ghost blog

I've moved my blog from Blogger to Ghost and I changed the domain at the same time. To make sure everything went according to plan and that my old links kept working, I turned on the Google Search Console. It turned out to provide me with a couple of additional nice benefits as well.

I've moved my blog from Blogger to Ghost and I changed the domain at the same time. To make sure everything went according to plan and that my old links kept working, I turned on the Google Search Console. It turned out to provide me with a couple of additional nice benefits as well.

This post is part of a series:

If you've read the original article you've read that I switched from blog.jessehouwing.nl to jessehouwing.net and at the same time rewrote the urls (slugs in Ghost terms) of my posts. Of course, after 6 years of blogging my posts were linked all over the internet and I didn't want to break all these people.

The Blogger2Ghost.NET tool generates two files I've used to make sure all old links are still working:

  • urlmapping.json - a mapping file which translates the old Blogger urls to the new Ghost slugs. This is used during the conversion to fix internal links between posts and to create the new post structures.
  • redirects.json - a set of redirects based on Regular Expressions to automatically redirect users from one location to another. The file is mostly generated during the conversion process based on the contents of the urlmapping.json and the tagmapping.json. These redirects ensure that external links to the old Blogger urls keep working.
    {
        "from": "^\\/2014\\/01\\/[Ii]nstall-[Tt]eam-[Ff]oundation-[Ss]erver-[Pp]ower-[Tt]ools-side-by-side\\.html$",
        "to": "/tfs-power-tools-install-side-by-side/",
        "permanent": true
    },
    {
        "from": "^\\/2013\\/12\\/installing-windows-81-to-samsung-series\\.html$",
        "to": "/windows-devices-install-to-samsung-series-slate/",
        "permanent": true
    },
    {
        "from": "^\\/2013\\/12\\/resolving-test-run-issues-in-visual\\.html$",
        "to": "/visual-studio-vstest-fix-identity-references/",
        "permanent": true
    }

After importing all content into Ghost I registered the new domain (jessehouwing.net) in Google Search Console:

You may be prompted to prove ownership, in my case, since I had already verified my ownership to Google through Google Analytics this step was performed automatically.

The next step is to register your sitemap. Ghost automatically generates that file for you, so you don't really have to do anything other than tell google it exists, the sitemap will be used by Google to quickly index new posts:

Add your sitemap in Search Console to trigger a full site crawl

It may take a couple of hours for the indexer to crawl the site, and I was quite surprised by what it found:

  1. A number of pages with faulty links
  2. Pages with structured data errors
  3. Pages referencing my blog with typos
  4. The fact that Ghost redirect Regular Expressions aren't case sensitive
  5. The fact that Ghost redirect Regular Expressions match on the Url Encoded urls

When Google indexes your Ghost blog and when you have Accelerated Mobile Pages enabled, it does a couple of extra checks on the contents of your pages. This is both a blessing and a curse. As long as you have error, Google will lower your search rank. But at least now you know where these errors are:

As you can see I started out with 108 pages with issues and quickly worked my way down to 0.

When you click on an Issue, Google will tell you what the issue is and allows you to verify you've fixed it. I went through the broken links one-by-one and fixed images, external links and a couple of internal links.

Pages with Structured Data errors

As you can see on the AMP issues list I still have 83 non-critical issues in my Structured Data. All 83 of those are a missing primary image, when I started out I had other issues as well and Google helps you to resolve those.

The one that had the biggest impact was the Publication Logo. Google is very sensitive to the dimensions and file size of that image. The image must be exactly 600px wide or 60px high and not be larger than 600x60px. It took me a while to figure that one out.

To satisfy Google, the image must be exactly 600px wide or 60px high and not be larger than 600x60px.

Pages referencing my blog with typos

It also turns out that people don't always copy/paste links from one place to another. Google finds and reports links to your domain that hit an error page and quite a few of these were caused by people making mistakes when linking to your blog:

You can see a number of pages that link to 2016/01/upgrading-from-xaml-to-build-2015-with.html/

When you click the link you can see where it ends up currently:

Click the link to see where it goes to

Instead of chasing each of these mistakes and asking the authors to fix the url, I've added/updated the redirects.json to catch these mistakes and point them to the correct location (in this case I added .* at the end of the regex):

    {
        "from": "^\\/2016\\/01\\/upgrading-from-xaml-to-build-2015-with\\.html\\.*$",
        "to": "/vsts-buid-upgrading-from-xaml-with-minimal-changes/",
        "permanent": true
    }

After uploading the updated redirects.json you can quickly verify the link is now working:

And tell Google the issue has been fixed:

Mark the issue Fixed.

The fact that Ghost redirect Regular Expressions aren't case sensitive

It turns out that Blogger links and tags are case insensitive. Ghost redirect expressions aren't (for now, I submitted a Pull Request). And given the number of errors that were found, I suppose that Blogger hasn't been consistent with the generated links in RSS/Atom feeds in the past.

I've updated the Blogger2Ghost.NET tool to make sure that the Regular Expressions work on both the original case of Blogger as well as the all-lower-case version:

    {
        "from": "^\\/2014\\/01\\/[Ii]nstall-[Tt]eam-[Ff]oundation-[Ss]erver-[Pp]ower-[Tt]ools-side-by-side\\.html$",
        "to": "/tfs-power-tools-install-side-by-side/",
        "permanent": true
    }

Once I'd figured out the fixes that needed to be made, I updated Blogger2Ghost.NET to be able to take a mixed case redirects.json and to optimize it:

The fact that Ghost redirect Regular Expressions match on the Url Encoded urls

Similar to the case sensitivity issues, I ran into a couple of broken tag redirects.  I had assumed the Regular Expression would run against the decoded URL, but in fact Ghost will run the expression against the URL Encoded version of the URL.

This means that spaces have to be replaces wit h %20 among other things. The same optimize-redirects command will fix your existing redirects.

When you run blogger2ghost convert with a recent version these issues will not occur as the conversion tool now generates the correct redirects from the get-go.

Have you ever checked your blog?

Not until I started to look into the migration did I learn of the Google Search Console. Since my fixes and telling about it a number of friends have also updated their sites. Have you?

Photo credit: Brad Smithson

Leave a comment.