Seo tutorial

<< Prev


SEO (Search Engine Optimization), optimizes parameters from the source code of web pages to increase online visibility and site traffic.

When you enter a question in the web browser, the search engine responds with a list of links to webpages that might answer your question.
Any search engine has a crawler that collects information about all the content it can find on the internet. Search engines use algorithms based on mathematical formulas that generate a score.
Your webpage score is used when Google Spyder crawls and indexes your page.

Tips to increase search engine ranking:

The quality of your content.

Without good content it is impossible to rank high in Google.
You must publish regular (at least once a week), interesting articles, post pictures, videos or other media files. The text should be clear, concise and contain as many news as possible to attract visitors.

User experience.

Use an clearly searchable and easely navigable site with relevant internal linking and related content.
If the user will be pleasantly impressed at the first visit to the site, he will surely come back again.

Website speed.

It is an information about how quicly your webpage is loaded. It is a ranking factor. The size of the page increases with the use of images and javascripts.
Try to keep the size of the pages under 250 Kb (and especially not to exceed 1 Mb). Websites that load in more than 5 seconds can be labeled as slow by Google.

Devices compatibility.

All content of your website is optimised for any screen size or device. On the <headgt; section, you can set the viewport, which gives the browsers instructions of how to control the page's dimension and scalling.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

The initial-scale=1.0 sets the initial zoom when the page is first loaded in a browser.

Using the canonical link tag.

A canonical link tag is a way of telling search engines that a specific URL represents the master copy of a page. Using the canonical link tag prevents the risk of creating duplicate content where the same content is accessible by different URLs.

<link rel="canonical" href=""/>

Try to avoid frames

Frames can cause problems with search engines to index the content of the web page. Try to avoid frames anytime possible, and if you use them also use the NoFrames tag.

Use HTTPS secure connections

HTTPS (Hyper Text Transfer Protocol Secure) is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to.
Using HTTPS means that all communications between your browser and the website is encrypted (used for protect confidential online transactions or online shopping order forms).
When you request a HTTPS connections to a webpage, the website will initially send its SSL certificate to your browser. This certificate contains the public key needed to begin the secure session.

Use of <title> tag.

The title tag is the first thing a user seen in the search result. The title page is one of the most important ways for Google to determine your page's topic.
Not having the focus keyword in the title, severaly decreases your chance of ranking. The optimal title lenght is usually 50 to 60 characters.
Use action in the title page: download, search, watch, learn, access, buy, that give a more excitement because they indicate that the user will be able to do something beyound the keyword.
Use a question as a title. By asking a question, you create a curiosity gap.

Use headings on your website.

Headings and subheadings are very important for the readers. Headings are important to helps users understand the subject of a page or an article.
Using headings on web page increases chances of people actually reading your content, improves accessibility and might even contribute to SEO.
The words in each heading tag should be unique and targeted to the page they're on. Yow want to have only H1 tag per page because it's basically the subject of your page. You must to include the page's keywords inside heading tag.

Meta tags optimization.

Meta tags are snippets of text that describe a page's content. The most important meta tags are:
- Meta keyword attribute, contains a series of keywords which are relevant to the web page. This meta keyword element is invisible to visitors but visible for search engines.
Meta keywords lenght must be up 256 characters.

<meta name="keywords" content="keywords relevant for web pages">

- Meta description attribute is a brief description of the page. It explains to search engine what your page is about. Description lenght can be between 150 to 200 characters.

<meta name="description" content="description for web pages">

- Meta robots attribute which is an indicationto search engine crawlers as to what they should to with the page.

<meta name="robots" content="index, follow">

Use of robots.txt file.

Web robots (also known as crawlers or spiders) are programs that traverse the web automatically. Search engines use then to index the web content.
Web sites uses the robots.txt file to give instructions about their site to web robots.
Your site can have only one robots.txt file.
The robots.txt file must be located at the root of the website host that is applies to.
If a robot wants to visit a website, before it does so, if first checks for robots.txt file.
- To allow all robots complete access, the robots.txt file will contains:

User-agent: *

- To exclude all robots from the entire server:

User-agent: *
Disallow: /

- To exclude all robots from part of the server:

User-agent: *
Disallow: /tmp/

- To allow a single robot:

User-agent: Google

User-agent: *
Disallow: /


Using .htaccess file.

An .htaccess file is a configuration file for use on web servers. You can create the .htaccess file in a text editor (without any other extension) and then upload it to your site.
An .htaccess file is a way to configure the details of your website, without need to alter the server configuration file. With a configuration on .htaccess, we can do:
- Custom error pages:

400 - Bad request
401 - Authorization required
403 - Forbidden page
404 - File not found
500 - Internal error

In the .htaccess file, for create a 404 error page, we write:

ErrorDocument 404 /error_pages/404.html

- Redirection using .htaccess file:
For redirecting a specific domain to use HTTPS, add the following:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$$1 [R,L]

Website does allow page caching.:

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
ExpiresByType text/html "access plus 2 days"

Website does allow image caching.:

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"

Website does allow javascript file and CSS file caching.:

<IfModule mod_expires.c>
# Enable expirations>br> ExpiresActive On
# Javascript
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType text/css "access plus 1 month"

Set XSS Protection header
Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications. XSS enables attackers to inject client-side script into webpages viewed by other users.

<IfModule mod_headers.c>
# Set XSS Protection header
Header set X-XSS-Protection "1; mode=block"

Use alt tag and title tag for images.

When you insert image on html web page, you must set the alt tag and title tag attributes.
The alt attribute describes what is on the image.
The title attribute is shown as a tooltip when you hover over the image.
When a search engine crawlers inspect a page, images with properly formatted alt text contribute to how the page is indexed and where is ranks. If the browser can't process images, the alt text will be shown.

<img src="image.jpg" alt="image description" title="image tooltip">

Using sitemap:

A sitemap is an important part of optimizing any website. A sitemap is an XML file that is full of your individual webpage URLs.
The file is placed in a root folder of website and it's name is sitemap.xml.
Using a sitemap, the search engine crawlers, follow the links to all your individual webpages.
You can generate a sitemap (sitemap.xml) with a free sitemap generator application or online on the web.
You can submit your sitemap to Google from your Google Search Console.

Using an external CSS file.

In the HTML document, you can specify your style rule anywhere: in a <>head> section for a page, in the <body> section as inline style or using an external .css file.
Ideally, you should use a single file with an external style sheet and link it inside your document head element.

<link rel="stylesheet"> type="text/css" href="style.css">

A major advantage is using an external stylesheet is that it can be cached, so that styles that are common to all pages only need to be loaded once.
If CSS style are inline, they have to be loaded separately for every page.
The first major benefit of using external style sheet files is faster load times for your web page.

Social media in website

The importance of social media for certain businesses is immense. You can add social media buttons on the web page to improve social network presence.
You can also use Open Graph, Twitter Cards, or Publisher to connect to Google+.

Using hreflang tag

The hreflang tag is used to provide search engines alternative urls for different countries and/or languages.

<link rel="alternate" hreflang="fr" href="" />

Using media queries

The @media rule is used to define different style rules for different media types/devices.

@media (min-width: 768px) and (max-width: 1024px) {
h3.detail {
font-size: 250%;

The @media print rule is used to define different style rules and layout for printers.

@media print {
body { background: white; }
#menu { display: none; }
#wrapper, #content {
width: auto;
border: 0;
margin: 0 5%;
padding: 0;
float: none !important;


Backlinks are any link on a web page that points to your website. Backlinks make a huge impact on a website's prominence in search engine results.
Backlinks can be obtained in several ways:
- First of all, if the site has a very good content, visitors will comment and send their friends links to interesting pages.
- Enter to the forums, make interesting comments presenting news or solutions to problems, and complete a link to his own site.
- Links between sites with your friends can be exchanged.
- You can refer to the site on social media pages.
- You can sign up in web directories (not for free), but it does not help too much if those sites are not very well known.

<< Prev