Skip to content

Instantly share code, notes, and snippets.

@yongqianme
Forked from nicolasdao/seo_sem_guide.md
Created November 22, 2023 20:20
Show Gist options
  • Select an option

  • Save yongqianme/3a1f8d84dee0f565da8776000fb355a6 to your computer and use it in GitHub Desktop.

Select an option

Save yongqianme/3a1f8d84dee0f565da8776000fb355a6 to your computer and use it in GitHub Desktop.
SEO/SEM guide. Keywords: seo sem ux ttfb noindex robots.txt sitemap robots bundle

SEO & SEM GUIDE

Table of contents

Concepts

SERP

Stands for Search Engine Result Page.

Keywords

Optimizing a web page for keywords

Once you've found the list of keywords you wish a web page to rank for (ideally only a few because each technique only support one keywors at a time, therefore, too many different keywords will dilute your results), place them in the following HTML tags (sorted by order of importance):

  1. title tag in the HTML head.
  2. meta description tag in the HTML head.
  3. canonical link tag in the HTML head (e.g., <link rel="canonical" href="https://example.com"/>). The Google bot hates duplicate content. This tag tell the GBot which page is the one and only page that should receive SEO love from it. Use it even if you think you don't have any duplicate page, because in reality, you do. Indeed, as far as the GBot is concerned, https://example.com and https://example.com?refer=facebook are duplicated page.
  4. h1(1) tag in the HTML body.
  5. h2(1) tag in the HTML body.
  6. h3(1) tag in the HTML body.
  7. image alts tag in the HTML body. There are so many missing alt attributes in web page. This is a shame as it is a missed opportunity to rank.
  8. anchor text. Make sure that the text you use in your a tag describes the link as clearly as possible. If that links points to an external website, that website's domain authority will benefit from your good description. The same applies to an internal link. The Google bot loves organized content.

(1) A typical mistake is to use a H2 with no H1 because H1 looks too big. The issue is that H1 tags worth more than H2s when it comes to SEO. If the content of your header contains keywords you wish to rank for, try to use H1. Use CSS to change its style so it matches your design.

Finding the keywords ranking for a domain

To figure out what are the keywords for which a specific domain ranks, use the Organic Keywords Trend chart. To see that chart:

  1. Login to Semrush.
  2. Select Domain Analytics/Overview, enter the domain in the top input and click the Search button.
  3. Select the Organic Research in the left pane to see the Organic Keywords Trend chart.

Understanding the Organic Keywords Trend chart

The top horizontal bar can be read as follow:

  • Keywords: Current number of keywords that rank within the first 100 Google pages.
  • Traffic: Current number of users that those keywords have redirected to your website this month.
  • Traffic cost: How much would it cost to rank the way your keywords do.

The Organic Keywords Trend can be read as follow:

  • The legend show the colors that represent the keywords categories based on how they rank in the SERP (e.g., Top 3 are keywords that makes your domain rank in the top 3 Google pages).
  • Each vertical bar is a snapshot of the keywords ranking. For example, in the image above, hovering on the March 20 bar shows that 33 keywords in total ranked your webiste inside the first 100 SERPs. Amongst those 33 keywords:
    • 0 ranked in the first top 3 SERPs.
    • 5 ranked between the 4th and 10th SERP.
    • 4 ranked between the 11th and 20th SERP.
    • 11 ranked between the 21st and 50th SERP.
    • 13 ranked between the 51st and 100th SERP.

When you click on that bar, you can see the details of those keywords.

Finding the historical keywords ranking for a domain

This is achieved by following the same steps as the Finding the keywords ranking for a domain section. However, you'll need to have the Semrush Guru tier at minimum (almost USD200/month). In the Organic Keywords Trend chart, click on any bar in the chart to see the keywords ranking details for that point in time.

Website to-do list

  • Add all the must have meta tags in the header:
    • <meta name="robots" content="index,follow"> <!-- Very important, otherwise, Google might not be able to index your page -->
    • <link rel="canonical" href="https://your-website.com/"> <!-- Don't forget the trailing slash -->
    • <link rel="alternate" href="https://your-website.com/" hreflang="en"> <!-- Don't forget the trailing slash -->
    • <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
    • <!-- SEO, Meta and Opengraph -->
    • <meta itemprop="description" content="Clear page description">
    • <meta itemprop="name" content="Page title">
    • <meta name="description" content="Clear page description">
    • <meta name="keywords" content="SEO keywords">
    • <meta name="og:keywords" content="SEO keywords">
    • <meta name="twitter:card" content="summary">
    • <meta name="twitter:description" content="Clear page description">
    • <meta name="twitter:image" content="Path to image">
    • <meta name="twitter:title" content="Page title">
    • <meta property="og:description" content="Clear page description.">
    • <meta property="og:image" content="Path to image">
    • <meta property="og:title" content="Page title">
    • <meta property="og:type" content="website">
    • <meta property="og:url" content="https://your-website.com/"> <!-- Don't forget the trailing slash -->
  • Use JSONLD on all pages (please refer to Annex in the JSONLD examples section).
  • Use an absolute path in the canonical URL and make sure there is a trailing slash.
  • Explicitely set up the hreflang, even if you only use a single language. Use an absolute path for that URL.
  • Add a trailing / on all internal links and make sure that all web page are using /, otherwise, Google may think the 2 version are duplicated content.
  • Find a way to organize your text content so that important keywords are in H1 tags and less important keywords are in h2.
  • Use keywords in your URL paths. For example, if you're a shoe manufacturer, you may want to use a path similar to /shoe-manufacturing rather than /shoe.

Progressive Web Apps aka PWA & SEO

As of 2019, PWA are all the rage and Google has made a lot of progress to index them properly. To test how Google sees your PWA, please refer to the How to test how your page is seen by Google? section.

That being said, there are a series of caveats to avoid in order to not be penalized by Google:

  1. Avoid any URL with a #. Anything following the # is ignore by the Googlebot.
  2. Reduce the number of embedded resources in the page (especially the number of JavaScript files required to render the page), since these might not be fully loaded.
  3. Make sure required resources aren’t blocked by robots.txt.
  4. Use an accurate sitemap file to signal any changes to your website when using Accelerated Mobile Pages (AMP).

The first two points are the most important as the last two points are good practices for any websites in general.

How to

How to test how your page is seen by Google?

This renders all the HTML, but unfortunately, it won't render a full image of that HTML, just the beginning. To see the full render, you have not choice but to copy paste the HTML in a local file and render it yourself 😫.

How to check keywords ranking history for a domain?

Please refer to the Finding the historical keywords ranking for a domain section.

Annex

JSONLD examples

General website description

    <script type="application/ld+json">
    { 
        "@context" : "http://schema.org",
        "@type" : "Organization",
        "legalName" : "Australian Barnardos Recruitment Services",
        "alternateName" : "ABRS",
        "url" : "https://www.abrs.net.au/",
        "contactPoint" : [{
            "@type" : "ContactPoint",
            "telephone" : "(02) 9218 2334",
            "Email" : "[email protected]",
            "contactType" : "Sydney Office"
        }],
        "logo" : "https://www.abrs.net.au/images/abrs-logo-hd.png",
        "sameAs" : "https://www.linkedin.com/company/abrs---australian-barnardos-recruitment-service/"
    }
    </script>

Describing a home page structure

<script type="application/ld+json">
    {
      "@context":"http://schema.org",
      "@type":"ItemList",
      "itemListElement":[
        {
          "@type":"SiteNavigationElement",
          "position":1,
          "name": "Home",
          "description": "{{ page.homeSiteNavDescription }}",
          "url":"https://www.abrs.net.au/"
        },
        {
          "@type":"SiteNavigationElement",
          "position":2,
          "name": "About Us",
          "description": "{{ page.aboutUsSiteNavDescription }}",
          "url":"https://www.abrs.net.au/about-us/"

        },
        {
          "@type":"SiteNavigationElement",
          "position":3,
          "name": "Job Types",
          "description": "{{ page.aboutUsSiteNavDescription }}",
          "url":"https://www.abrs.net.au/job-types/"

        },
        {
          "@type":"SiteNavigationElement",
          "position":4,
          "name": "Industry Sectors",
          "description": "{{ page.aboutUsSiteNavDescription }}",
          "url":"https://www.abrs.net.au/industry-sectors/"

        },
        {
          "@type":"SiteNavigationElement",
          "position":5,
          "name": "Clients",
          "description": "{{ page.clientsSiteNavDescription }}",
          "url":"https://www.abrs.net.au/clients/"
        },
        {
          "@type":"SiteNavigationElement",
          "position":6,
          "name": "Jobs",
          "description": "{{ page.candidatesSiteNavDescription }}",
          "url":"https://www.abrs.net.au/jobs/"
        },
        {
          "@type":"SiteNavigationElement",
          "position":7,
          "name": "Blog",
          "description": "{{ page.aboutUsSiteNavDescription }}",
          "url":"https://www.abrs.net.au/blog/"

        },
        {
          "@type":"SiteNavigationElement",
          "position":8,
          "name": "Contact",
          "description": "{{ page.contactSiteNavDescription }}",
          "url":"https://www.abrs.net.au/contact/"
      }]
    }
</script>

Describing the position in the website

<script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "BreadcrumbList",
      "itemListElement": [{
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://www.abrs.net.au/"
      }, {
        "@type": "ListItem",
        "position": 2,
        "name": "About us",
        "item": "https://www.abrs.net.au/about-us"
      },{
        "@type": "ListItem",
        "position": 3,
        "name": "Our values",
        "item": "https://www.abrs.net.au/about-us/values"
      }]
    }
</script>

ahrefs recipes to rank

General SEO

Keyword research

Link building

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment