Now another very important step is search engine
optimization.
When you build an amazing website you'll of course want to
make sure that people can find it,
that it ranks highly on Google or other search engines,
and that in the search engine results
it's presented correctly.
For this,
there are certain things that you can do in your HTML code
to describe your page and highlight your content, though
I will say there were times in the past where you could add
a lot of keywords and spammy content on your website.
This doesn't really work anymore.
Nowadays, Google bot and bots of our search engines are
really great at detecting content and quality.
They also measured the performance and speed of your
website.
So how long it takes until users will be able to see
something on the screen.
And therefore these are the areas you should focus on.
You don't want to just start spamming keywords or anything
like this on your website. Instead,
you really want to focus on high quality content.
And then in addition,
add some metadata and things to the site that make it easier
for Google to understand your website.
Now, what am I talking about?
Well, if we have a look at the static site, though,
it's the same for the dynamic site.
Then there, we, for example,
get to this title in the head section.
Now this title is important because it does show up here in
the tabs.
But in addition, if you search for something, for example,
if I searched for my own company here,
then you also find the title that's set in the head section
here in the search results.
And we also find a description text here,
and that's for example, a text,
which we haven't set up for our site here for this demo site
yet, because I want to do that to gather with you.
Now, Google will also scan the rest of the page,
as I mentioned,
and it will understand your page pretty well.
And it will then of course also analyze the content of your
page and therefore understand what your page is about.
So your content should be good.
But in addition,
you always want to add another Meta tech here somewhere in
the head section. A meta element,
which is a wide element where the name should be
description.
And it has to be description because Google and other search
engine bots will look for this name.
And then the content should be the description you want to
show up here in the search results.
So here, for example, you could write,
I am a web
developer
because I completed a
complete or comprehensive web development course.
Now you want to keep that description fairly short and
minimal. You don't want to write an essay here.
It should probably not be longer than 2 or 300 characters.
So you want to have a short,
concise description about the page on which you have it.
If you have a website of have multiple pages,
every page should have its own title and description,
which should be tailored for that specific page to which it
belongs because different pages also get different search
results here on Google.
So every page should have its own meaningful title and
description. And then if your content is good as well,
good search results will come from its own.
I also will say though, that, of course,
for a certain keywords, for example,
if you Google for Java script,
this is such a prominent and often searched keyword that
no matter how good your site content is,
if you write about JavaScript in general,
chances of getting a good ranking for this keyword will be
slim anyways.
So if you want to get a better rank,
you want to find some niche keywords,
and then create good content on that.
Then add titles and metadata,
and then you'll have a solid chance of Google picking up
your site and finding your website.
I also want to highlight, of course,
that search engine optimization is also a big topic on its
own. There also are entire courses about that.
And there's way more you can learn about that.
Also about how you can tell Google Crawler
and other search engine crawlers on how to read your
website and which pages they maybe should ignore.
That's all beyond the scope of this course,
but setting a description and a title is something you
should definitely know and take away from this course.
Therefore we'll not just do it on this static website,
but also in the view here in the main EJS file of our,
other website. Here in Maine,
EJS often including head I'll add this Meta tech
and I do it here because of course it should be specific
to this site here.
I don't want to include it in head EJS because then every
page that uses this include would have to same meta
description.
I want to have a specific description for the main page and
therefore I added meta here,
this description meta right before I close to head tech,
just as I set the page title here for this specific page.