Xavier Oh

Setup Google Search Engine Optimisation (SEO)

Table of contents

Site essentials

Each page should have a <title> and <meta name="description"> tag.

<head>
  <title>Welcome - My Site</title>
  <meta name="description" content="Insert description here" />
</head>

For more information:

Robots.txt

The robots.txt file is checked by web crawlers to know what pages should and should not be crawled. The file can be found by navigating to /robots.txt on sites that have them. For more information visit https://www.robotstxt.org/robotstxt.html

Sitemap.xml

A sitemap is an XML file that tells web crawlers what pages there are on the site to be crawled. For example, the sitemap for this site is shown below

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://xavieroh.vercel.app</loc>
  </url>
  <url>
   <loc>https://xavieroh.vercel.app/posts</loc>
  </url>
  <url>
   <loc>https://xavieroh.vercel.app/posts/convert-md-to-html</loc>
  </url>
  ...
  ...
  ...
</urlset>

Whenever there are changes to the sitemap, access the link below with your sitemap URL to request a crawl.

https://www.google.com/ping?sitemap=https://website.com/sitemap.xml

Lighthouse

Open up the developer console in chrome and run lighthouse on your site.

Improve the SEO score by following the best practices under the SEO section.

Google Search Console

Login to Google search console.