Have 100% with Search Engine Optimization
Tags: webdev, seo, indexing
Published: 2019-02-26 17:31:35

---
title: Have 100% with Search Engine Optimization 
published: true
description: Do you want your WEBsite to have more impressions with search engines? Good thing, read this article and you will have a better SEO level optimization!
tags: webdev, SEO, indexing
cover_image: https://thepracticaldev.s3.amazonaws.com/i/nlnlv6ns7x0a08usyc6b.jpg

---

* **Introduction**

Do you dream of having a top SEO optimization or simply more impressions on your website ? What follows is very basic in web development. But is very very useful.

The entire **Search Engine Optimization** part must be written in the `<head>` tag. Don't put in `<body>` please.


* **Default Tags**


```html
<meta charset="utf-8">
<!-- Let browser know website is optimized for mobile -->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<!-- Your sublime title -->
<title>My title under 70 characters.</title>
<meta name="description" content="This is my loooong description, and ">
<!-- This is for index on search engine -->
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow">
<!-- Your favicon in .png format or another -->
<link rel="icon" type="image/png" href="favicon.png"/>

```


✅ A description must be long and detailed. It should not be displayed identically on several pages, otherwise you may have malus in the optimization. The description must be the longest, between 150-160 characters. 

✅ A description must be long and detailed. It should not be displayed identically on several pages, otherwise you may have malus in the optimization. The description must be the longest, between 150-160 characters. 


> ⚠ In these two situations, avoid repetitions and try to modify them on each page. 


* **Twitter Card** (Also know as _X_)

When you share on social networks, you often have a nice presentation of the page, but be aware that we can change the presentation on Twitter and on other networks. Why do I take the Twitter case as special? Because they have their own tag, if you take the ones we use for Facebook, you'll notice by sharing that it won't work. I show you an example below.



```html
<!-- Twitter Card -->
<meta name="twitter:url" content="https://my.link.org/">
<!-- This is a large image, see below if you want a small, square image. -->
<meta name="twitter:card" content="summary_large_image"/>
<!-- Optional but displays who owns the website -->
<meta name="twitter:site" content="@MyAccount"/>
<meta name="twitter:title" content="My beautiful title" />
<meta name="twitter:description" content="This is my description, it will only appear on Twitter."/>

```

[Example of `summary_large_image` (Click to display it completely) :](https://twitter.com/Thomasbnt_/status/1773278909380903019)


{% embed https://twitter.com/Thomasbnt_/status/1773278909380903019 %}


[Example of `summary` (Click to display it completely) :](https://twitter.com/Thomasbnt_/status/1775169821816066380)

{% embed https://twitter.com/Thomasbnt_/status/1775169821816066380 %}

You can then test if your Twitter Card on your website works. [Click here and enter your URL](https://cards-dev.twitter.com/validator).

To learn more about the limitations and how to customize these tags with a player, application or other, you have [the documentation](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards) that properly informs you about them.


* **Open Graph(OG)**

The rest of the SEO part is devoted to Open Graph. Used mainly with Facebook, Reddit and many other websites, it is the essential piece of code that must also be used. 

```html
<meta property="og:title" content="My sublime giant title"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="https://my.link.org/favicon.png"/>
<meta property="og:description" content="This is my description, that's never going to appear on twitter."/>
```

[Example of post on Facebook with OG](https://www.facebook.com/thepracticaldev/posts/1063561263820194)


![Preview of a Facebook post from DEV](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/faybtpt14cle0uyg1abq.png)




_________________


Photo by [Clem Onojeghuo](https://unsplash.com/photos/QBvtgLdmTbQ?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/search/photos/search?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)

|☕|Check my [Twitter account](https://twitter.com/thomasbnt_). You can see many projects and updates. You can also [support me on Buy Me a Coffee, Stripe or GitHub Sponsors](https://thomasbnt.dev/donate). Thanks for read my post ! 🤩|
|---|---|