SEO fundamentals tutorial

avatar

Borislav Hadzhiev

Sat Nov 28 20203 min read

We'll cover some of the very basics of SEO. No black magic tricks, that would rank you on the first page, no promises, just some of the things that might matter when our sites are being ranked.

Table of Contents #

  1. The Document Title
  2. Linking to pages you want indexed
  3. Bots don't fill out forms
  4. Choose a suitable domain / url path
  5. Use the meta description tag
  6. Heading tags are the most important
  7. The content matters
  8. Include robots.txt
  9. Include sitemap.xml

The Document Title #

Let's start with the foundation. Always update the document title - it serves as a short description of the page. When our site pops up in a google search the title of the document is rendered in large font, serving as a link to our page.

<title>Your Document title</title>

Linking to pages you want to get indexed #

Everything has to be connected via links, no search bot is going to attempt to guess the URIs on your website. If we have a /blog endpoint available, but there's no link to it, it will not get indexed.

Always specify an alt property on images #

Search bots don't use machine learning to guess what our image represents (at the time of writing). For that reason we should always set the alt property on image tags.

<img src="/path/to/image.png" alt="white cat" />

Bots don't fill out forms #

If we have content on our web page that is only accessible after the user fills in a form, chances are it won't get indexed. The same counts for content that is only accessible by registered users, so we have to be mindful when restricting content.

Choose a suitable domain / url path #

Try to have a domain that represents what your business does, what people would search for in a search engine. For example if you sell bikes - bikes.com would be a good pick, however most good domain names are already taken so try to at least include the information in the url path - example.com/bikes.

Use the meta description tag #

The tag provides a concise summary of our web page. The tag should be one - two sentences. It appears underneath the blue clickable links in a search engine results page.

<meta name="description" content="This is meta description text. This will often show up in search results." />

Heading tags are the most important #

When our pages get parsed by robots, some tags are perceived as more important than others. Heading tags get ranked depending on what headings they are. Always make the few most important headings h1 and h2 tags.

The content matters #

It's important how often our keywords appear in the body content. That's why so many people just spammed words, that might get picked up by bots in hidden html tags a few years ago.

However those days are long gone and the search bots are not as easy to trick nowadays. For that reason the best thing we could do is to have more related content at a single endpoint. What I mean by that is if you have for example a long blog post, don't split it into multiple parts, instead publish it as is and you will have more related keywords at a single endpoint.

Include robots.txt #

The robots.txt file is:

  • placed at the root directory of our website
  • an instruction on what the search engine bot is NOT allowed to crawl

You could disallow the search crawler to crawl some of your pages if you don't want a page to get indexed.

Hackers may look for the pages that you disallowed in your robots.txt to select endpoints they should target.

Include sitemap.xml #

The sitemap is:

  • used to inform search engines about URLs on a website that are available for crawling
  • the opposite of robots.txt

The sitemap lists the URLs for a site and you could write it yourself or generate it using a script.

Further Reading #

Add me on LinkedIn

I'm a Web Developer with TypeScript, React.js, Node.js and AWS experience.

Let's connect on LinkedIn

Join my newsletter

I'll send you 1 email a week with links to all of the articles I've written that week

Buy Me A Coffee