Blogger SEO title tag and twitter sharing

Digital nomad stuff about software, computers, operating systems, hosting providers, and computer games.

Blogger SEO title tag and twitter sharing

Unread post by Santeri » Mon Jul 24, 2017 12:27 pm

Blogger has a serious issue in the default template regarding title tag and sharing blog posts on twitter. By default blogger is adding blog title in the beginning of the page title which will hurt the SEO of your blog. You need to get your blog post title first, and only after that the blog title.

You can fix the issue by editing your template (Blogger -> Themes -> Edit html). Before you edit the template, make sure to backup your template and copy your custom CSS (Blogger -> Theme -> Customise -> Advanced -> Add CSS) to notepad. There is a bug in blogger that will reset your custom CSS whenever you edit your template. I have reported to Google.

Find the following text from Theme source code

Code: Select all

<title><data:blog.pageTitle/></title>
and replace it with this code

Code: Select all

<b:if cond='data:blog.pageType == &quot;index&quot;'>
  <title><data:blog.pageTitle/></title>
<b:else/>
  <b:if cond='data:blog.pageType == &quot;archive&quot;'>
    <title><data:blog.pageName/></title>
  <b:else/>
    <title><data:blog.pageName/> - <data:blog.title/></title>
  </b:if>
</b:if>
    <meta content='summary_large_image' name='twitter:card'/>
Now your title tag is fine. To test the fix, share one of your blog postings on twitter. You should see a photo from your blog post, title and description instead of a plain link.