Reputation: 41
Currently when I send my website link it doesn't show anything.
I want it to show a preview of my website like so (on Discord):
https://i.sstatic.net/7VCXn.png
What exactly should I add? Perhaps a metatag?? Thank you!
Upvotes: 3
Views: 4776
Reputation: 1517
Yes the meta
tag with description
attribute is the one responsible for such SEO information related to search results on search engines.
Add this in your <head></head>
tag
<meta name="description" content="A description of the page" />
Edit:
For more customization on the search result preview (Adding an image) those meta tags can be used
<meta property="og:image" content="https://example.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
<meta property="og:image:alt" content="A shiny red apple with a bite taken out" />
Note that the issue might be happening due to used protocol HTTP
or HTTPS
without using the appropriate meta
tag.
For more information about the Open Graph Protocol visit this link
Hope this helped.
Upvotes: 1
Reputation: 31987
It appears Stack Overflow accomplishes it with the following meta
tags:
<meta property="og:type" content="website">
<meta property="og:url" content="https://stackoverflow.com/">
<meta property="og:site_name" content="Stack Overflow">
<meta property="og:image" itemprop="image primaryImageOfPage" content="https://cdn.sstatic.net/Sites/stackoverflow/Img/[email protected]?v=73d79a89bded">
<meta name="description" content="Stack Overflow is the largest, most trusted online community for developers to learn, share their programming knowledge, and build their careers.">
The og:
symbolizes the tags are part of the Open Graph protocol
Upvotes: 4