How to add meta tags to your website

While meta tags don’t affect a page’s search engine ranking, they’re still crucial for accurate indexing and displaying relevant details in search results. In this guide, we’ll explain what meta tags are, some different types of meta tags, and how to add tags to a website. 

What are meta tags?

Meta tags are basic elements of search engine optimization used to describe the page content. They are hidden in the <head> section and are not viewable on a page. 

There are several meta tags that you can use, but the three most common are title, description, and keyword tags. Let’s take a look at each one.

The title tag

The title is displayed on a search engine results page. Each page on your site should have a unique title that accurately describes its content and encourages users to visit the page. Google usually displays the first 50-60 characters of the title, so make sure the most descriptive words are at the beginning.

The description tag

The description is often displayed below the title in search engine results. Each page on your site should have a unique, accurate description of 150-160 characters. If the automated search engine crawlers determine that the description doesn’t match the page content, it may not be displayed on the search engine results page, so it’s important to be accurate.

The keywords tag

To add meta tags to a web page, you need to edit the <head> section of the HTML file. There are two methods you can use to edit HTML files:

How to add tags to a website

To add meta tags to a web page, you need to edit the <head> section of the HTML file. There are two methods you can use to edit HTML files:

  • If the file already exists on your website, you can download it using an FTP client and then edit it using your preferred text editor. If you are creating a new file, create the file in your text editor. When you’ve made the changes in the file, save and upload it. For more information, see Downloading and using FTP software programs.
  • You can also add or edit the file in the cPanel File Manager. For more information, see How to navigate in cPanel’s File Manager.

Open the HTML file and locate the <head> section near the top of the file. Depending on how you created the page, there may already be a title and some other meta content. The title is between HTML <title></title> tags. 

The description and keywords are entered in <meta> tags. For example, in the code below, we have meta name=”description” and meta name=”keywords”. The meta http-equiv tag specifies the character encoding and was automatically added by my HTML editor when creating the page.

<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <title>How to add meta tags to a web page</title>
 <meta name="description" content="All about meta tags and how to add them to your website.">
 <meta name="keywords" content="meta tags, meta description, meta keywords, SEO, search engine optimization">
</head>

More information

For more information about search engine optimization, see How to improve your search engine rankings in the HostPapa knowledge base.

If you need help with your HostPapa account, please open a support ticket from your dashboard.

Related Articles

Get online with our affordable web hosting

Get online with our affordable web hosting

Learn more now
HostPapa Mustache