0% Complete
0/0 Steps
  1. SEO Basics
    12 Topics
    |
    1 Quiz
  2. Semantic Core
    12 Topics
    |
    1 Quiz
  3. Keywords Clustering
    14 Topics
    |
    1 Quiz
  4. Website Structure
    11 Topics
    |
    1 Quiz
  5. On-Page SEO
    55 Topics
    |
    1 Quiz
  6. Technical SEO
    9 Topics
    |
    1 Quiz
  7. SEO Reporting
    38 Topics
    |
    1 Quiz
  8. External SEO
    8 Topics
    |
    1 Quiz
  9. SEO Strategy
    2 Topics
    |
    1 Quiz
Lesson 6, Topic 3
In Progress

Source Code

11.02.2022
Lesson Progress
0% Complete

Behind any site and its function lies source code that turns the browser into a convenient and intuitive user interface.

How to read source code

The ways to view the source code are different depending on your operating system and browser. Below, I will explain how to view the code on Windows and Mac, and it the end, I will discuss viewing it on a phone or tablet.

How to view the source code on Windows

You can view the code on Chrome, Firefox, Internet Explorer, Opera, Edge by hitting “CTRL + U”, another way is to right-click anywhere and select the “View Page Source”

There are alternative methods, in Chrome settings, you can find the “Advanced Tools” tab and then by clicking on “Developer Tools”, you can see the code.

How to view the source code on Mac

The keyboard shortcuts are a bit different here, but in any browser, you can right-click and hit “View Page Source”.

More on the keyboard shortcuts in each browser:

  • Chrome- Option + Command +U
  • Firefox — Command + U
  • Safari — Option + Command + U

How to find SEO elements in the source code

The Title

This tag is one of the most important SEO elements, it is the title that you see when you Google something. The Google search robots pay the most attention to this tag when doing the rankings.

To find this tag, find the <title> attribute in the code source page. It usually follows the <head>.

When ranking according to keywords, Google not only takes into account the tile, but the search engine considers this tag to be a key one. This is why it is worthwhile to approach it carefully. It should contain the correct keywords while remaining organic.

It is also worth remembering that like any other with content, the title should not be duplicated on different pages, and there should be one on the page.

Firstly, duplication loses important resources in terms of the number of keywords searches that can be put on different pages. Secondly, Google cannot understand which page on your site should be issued for a specific keyword search.

You can check it manually or if you have more than 30 pages, it’s better to use a special tool to check if your titles are duplicated, for example, “ubersuggest”.

The Descriptions

Google uses this tag like a snippet, i.e, the text that users see at the bottom of the page.

If this tag is not prescribed, Google will extract a piece of text from the page at its discretion.

Although this tag does not directly affect the keyword ranking, it is a marketing error to ignore it, just like duplicating descriptions. 

The optimization of descriptions allows you to experiment with and increase the conversion rate for page clicks. Google itself forms a snippet but it can also take your prescribed description so you need to optimize it so that search bots consider it to be the most relevant for this purpose.

The h1

This is the main title on a page, it has an impact on the ranking and is usually an important element of the UI. Most often, h1 thing that enters the user sees on the site and it should be a good response to the user’s request.

Most often, this is the most noticeable thing on a page; additionally, Google counts the h1 as one of the most important ranking factors.

In this example the h1 contains the desired keywords and remains organic, meaning it responds to the user’s request. It is usually 20-70 characters, but you should not dwell on this because its length is not the main thing.

Given that Google wants to rely more on user experience when ranking, the title becomes an even more important element of optimization.

There should only be one h1 heading on a page, by using several you are making the task less effective. When you duplicate the h1 header, you lose the ability to use more keywords and phrases on your site and, most likely, lose the opportunity to make the site more user-friendly.

The goal of link building is getting backlinks from other resources on your site, the more authoritative the resource, the better.

For Google, links from one source to another signifies some approval. If you are linked to, you gain credibility

In SEO, the authority that is transferred from one site to another is called “weight”. If you need to put a link on your source, but you do not want to share this weight for some reason, you write the “rel= ‘nofollow’” tag.

To Google, this means that the link must be ignored. Getting good links is a complicated process and is extremely unpleasant if you have been working a long time to get the right link and it ends up having the “nofollow” tag.

Relatively recently, Google released an update regarding the “nofollow” attribute. Some hints that can help the search engine to better understand what the link is.

These are the attributes: 

  • Sponsored is an attribute that is assigned to “nofollow” if this link is an ad. For example, let’s take the scenario where seoquake places an ad link for SEMrush. Here is what it should look like for Google according to the new rules:
    <a href=”https://www.seoquake.com/” rel=”sponsored”>SEMrush</a>
  • UGS is an attribute that is needed when you post a link to user-created content. I.e. guest posts, comments, forum topics, etc. Suppose a user leaves a link in the comments to this article, it should look like this: 

<a href=”http://facebook.com/fedotovrf” rel=”ugc”>Facebook</a>

Alt and Title tags for images

Alt-tags are alternative texts for images, a description for the search engine of what is shown in the image. This can help attract traffic from image searches.

Users will only be able to see alt tags if they look at the source code or disable the manual upload of images.

You should not prescribe alt for decorative images since you can be punished by Google for over-optimization. Make sure to optimize these images:

  • Screenshots
  • Infographics
  • A team photo
  • Pictures of goods
  • The company’s logo

Remember, well-optimized alt-tags can bring traffic from an image search, so do not neglect this. For product photos, online stores most often write the product name and serial number in the alt tags. 

The title is displayed when you hover over the image.

This attribute does not affect the ranking. Some experts say that a well-optimized title positively affects the behavioral factors and improves the user experience on the site, which is certainly good for SEO.

Connected Analytics

Make sure every page of your site is connected to Google Analytics. Searching the source page for “UA” should help you approximately find the next picture on the page.

The UA must be followed by a 7-digit code, this confirms that Google Analytics is installed on the page. Sometimes this code is added several times, if you find this, you should remove the extras.

To install analytics or another tool to your site, you need to add the code of these tools to your site code. Google has a tool that partially solves this problem. Google Tag Manager — is a tool that allows you to add the necessary scripts to the site within the interface of the tool itself.

With it, you can add analytics to the site, place remarketing tags, integrate a custom script, and quickly make changes to existing tags.

Tag Robots

The robots instruct the search robot if it is necessary to index the page and whether to take into account and follow the links indicated in the content. This tag is useful if you want to close the page from indexing.

If your page is not indexed it could be blocked from that, it is worth checking to see whether this is written there:

content =”noindex, nofollow” or content = “none”

If the Google robot comes across these tags in your page’s code, it will not index it because you told it not to.

The “canonical” tag will come in handy for you. This tag will help the search engine understand which of the pages is the original. By prescribing “canonical”, you are telling Google that this page is canonical and the rest are copies. The canonical page will be browsed much more often, also Google will not have to choose the canonical page on its own (which can have unpleasant consequences) or it might even consider the pages to be equal.

The “hreflang” attribute is useful if the website is available in several languages. It will help the search engine determine which language to display to users in different regions. Google can do this itself, but it is better to help identify which pages are made for which regions so that there are no misunderstandings.