Why you should care about seo and how to check for it

Prologue

Today I learned a hard lesson on why seo is important. I'm writing this so hopefully no one else has to repeat my mistake.

Search Engine Optimization (seo)

When you create a new website, you most likely want it to be included in search results. Search engines such as Google sends out web crawler bots to index your website.

To improve the visibility and ranking of your website, you need to do a lot of seo work. Based on this, you should understand the importance of seo. If your page is not indexed by google, it means your website will never show up as a google search result.

There are a lot of resources out there for how to improve seo, so I won't go into details here. However, I would mention some of the more important ones that you should know are meta tags and sitemap.

How to check if your page is indexed?

For checking if google has indexed your website, there is a tool called the Google Search Console.

In this tool, you can check analytics, such as number of search clicks and number of impressions. Most importantly, you can inspect your urls and see if they are indexed by google.

Google provides a handy guide on how to use the search console.

What I did wrong

So when I first created my blog, I completely ignored seo. I just wrote content freely and let it sit.

Recently I was curious to see how my blog ranks in google search results and to my surprise, it was not there. Not even if I used the exact url and title in my search.

However, my main website showed up and I was very intrigued.

google site check
Google search result for my main website.

Then I used the Google Search Console to inspect both my main website and my blog. As expected, Google says my main website is indexed whereas my blog can not be found

seo yes
Google search console found my main website.
seo not found
Google search console did not find my blog.

I repeated the same experiment with my blog posts and Google says that they are discovered, but not indexed.

seo not indexed
Google search console discovered one of my posts.

I assume this means I have a problem with my blog page or google will eventually come back and index it sometime in the future. Given that I can not do anything about google index since its index request feature is down, I decided to take a look at my seo tags.

As it turns out, most of my seo tags were wrong.

As you can see below, ygongdev.github.io/blog/blog/ should've been ygongdev.github.io/blog/

<link rel="canonical" href="https://ygongdev.github.io/blog/blog/" />
<meta property="og:url" content="https://ygongdev.github.io/blog/blog/" />
<meta property="og:site_name" content="Yicheng Gong’s Blog" />
<link rel="next" href="https://ygongdev.github.io/blog/blog/page2/" />

You see, I'm using Github Pages with Jekyll, so my seo tags were all autogenerated based on my _config.yml.

It turns out that my url in my _config.yml was wrongly formatted.

baseurl: "/blog"
url: "https://ygongdev.github.io/blog"

My url should have been pointing at the base hostname, so it should've been:

baseurl: "/blog"
url: "https://ygongdev.github.io"

After this change, I was able to verify that my seo tags were generated correctly. However, Google Search Console still complained that my blog url was not found.

Hopefully, it is because the google crawler might take a few days to crawl. Otherwise, it is back to debugging.

Don't make the same mistake as me!