All About On‑Page Search Engine Optimization

Generate more traffic and higher rankings with web pages that are as useful for people as they are for search engines.

All About On-Page Search Engine Optimization Hero Illustration

Once you have an idea of how search engines work, the first step of search engine optimization (SEO) is to identify the keywords your website should target, based on the words or phrases people search for online to find your business. These keywords will be at the foundation of your strategy for on-page optimization.

On-page optimization is the application of keyword research to page content on your website. The purpose is to ensure that your page content provides a suitable answer to the queries that people in your target audience search for. It also makes your web pages easy for search engines to analyze and match with the right search queries.

When you begin to incorporate keywords into your webpage content, those webpages will have the potential to rank for relevant search queries and drive more traffic to your website.

Applying keywords

Before you begin on-page optimization, you should identify at least one keyword that’s relevant to each page on your website. On-page optimization is about focusing on a single page at a time and writing keyword-rich content for it. This doesn’t mean simply repeating the keyword over and over again—that’s called “keyword stuffing,” and it can actually cause Google to penalize your site.

It does mean creating content with keywords in mind, looking for opportunities to naturally include a target keyword, or variations and synonyms of it. There are certain places on a webpage where it’s considered SEO best practice to include keywords because doing so correlates with better rankings.

Anatomy of a webpage

Most web pages have HTML elements that users will see in different places and contexts.

  • URL: The web address of the page
  • Title tag: The most important on-page factor—it displays on search engine results pages (SERPs) as the headline of a page, telling searchers and search engines what the page is about
  • Meta description: An 160-character summary of the page that lives in the code and shows up on SERPs and, often, when a user shares a link to the page
  • Supplemental title tags: Subheads (indicated in code with header tags) that provide a further description of what’s in that part of the page content
  • Body copy: Most of the copy that shows up on a page; the content alluded to by the title tag
  • Alt text: A description of an image that appears in the page code and is accessible to screen readers

These page elements play a big factor in communicating meaning to readers, and they’re all ranking factors. This means that Google weighs them when deciding the best search results for a given query. By optimizing each element to include keywords, both your website visitors and Google will better understand how your page provides an answer to a query.

Some of these elements also play a role in getting traffic from the SERP; featuring the right keywords in your metadata can encourage users to click through.

Write a keyword-driven URL

The URL is the webpage address, which users either type into the browser or reach by clicking a link on another webpage (such as a SERP). While the URL is not considered a powerful ranking factor, ensuring your URLs are keyword-rich is still a sensible approach.

Incorporating keywords into a URL makes it memorable and easier to type. It communicates meaning by making it clearer to the user what content to expect before they actually reach the page.

You should always use keywords in a URL to indicate the structure of your site. For example, indicates that this page is a part of Mailchimp’s marketing glossary and that it’s specifically dedicated to SEO. Reflecting the hierarchical site structure makes the URL more meaningful.

As a rule of thumb, you should use descriptive, keyword-rich URLs wherever possible, and use hyphens to separate words.

Feature keywords in your title tag

The title tag is visible in many important places, telling users and search engines what the page is about.

  • At the top of the browser tab when viewing the page
  • In the SERPs, along with the URL
  • On social platforms, when a user shares the URL

It’s one of the most important on-page factors, so it’s worth investing time to optimize. Consider plugging your keywords, phrases, and business details into one of these formats:

  • Primary Keyword - Secondary Keyword | Brand Name
  • Product Name - Product Category | Brand Name
  • Primary Keyword - Current Month Current Year | Brand Name

Which of these works best for you will depend on the page content and keywords you feature. When optimizing title tags, it’s often worth analyzing the SERP to see how your competitors differentiate themselves with their title tags, which may help inform your strategy.

The length of your title is important, too. Google doesn’t apply strict rules to the number of characters in your title (they’re more focused on pixel width), but your title tags generally shouldn’t be longer than about 50 to 60 characters.

Gain traffic with a compelling meta description

Although it’s considered part of on-page optimization, the meta description doesn’t display on the page. Rather, it’s the snippet of text that displays in the SERP underneath the title for each listing.

The function of the meta description is to provide a brief summary of the page content so that users know what to expect when they land on the page.

However, it’s also an opportunity to encourage users to click, as the meta description is effectively a brief advertisement for what’s on the page. So if you write compelling copy here, it might convince users to click on your page instead of visiting your competitors.

As with the title tag, there’s a limit to the number of characters that Google displays in the search results—about 155 characters on desktop and 120 characters on mobile—so it makes sense to get your most important content in the first 120 characters.

You don’t need to have a meta description for every single page on your website. If you don’t write one, Google will glean content from the page and use that instead. While this isn’t optimal, it’s useful to remember if you have hundreds (or thousands) of pages to manage. Prioritize your most important pages and ensure they all have unique, descriptive, and compelling meta descriptions, but don’t worry if some of your less important pages don’t have them.

Structure your content with headers

In HTML, the H1 through H6 header elements define headings. Their typographical function is to provide a hierarchical structure to arrange content on the page. So, H2s nest under the H1, and H3s nest under the H2s. There should only be one H1 on the page. H2 through H6 outline subtopics, but H1 should describe the main content of the page.

Google uses the H1 as a factor because it’s usually a good descriptor of the page content. Therefore, including keywords in your H1 will boost your on-page SEO. But, of course, you should also consider usability to ensure that H1s are also helpful to users who land on the page.

On an e-commerce category page, for instance, you will often see the category name used as the H1, like “Womens’ Sneakers & Shoes.” But on product pages, the H1 will typically be the product name itself, like “Nike Air Force 1.”

In some cases, the H1 might be the keyword you wish to target. In other cases, you may need to settle for something more user-friendly—but still related to your keywords.

Use images and alt attributes

Images are an important aspect of any webpage. They help deliver meaning visually, and they break up blocks of text to improve readability.

Although sighted humans can quickly derive meaning from images, computers aren’t quite as adept (at least not yet). By including an “alt” attribute that describes an image, you can help both computer algorithms and users who are blind or have low vision understand what that image depicts. Alt text is hidden in the HTML and isn’t visible on the screen, but a screen reader will know to read it aloud.

Google also uses the additional context that alt text provides to better understand the page content. By including keywords in your alt text, you can give Google further clues about the relevance of your content.

Body copy

In terms of SEO, all the elements covered above are essential—they create the foundation for a discoverable site.

Beyond that, the body copy of your webpage offers a real opportunity to optimize. There are no character limits, and it gives you your best chance to communicate to search engines what the content represents.

When you begin to write body copy, revisit your keyword research to understand the types of search queries you’re seeking to answer with this content. Your goal should be to write body copy that answers the most common search queries associated with your target keywords. By doing this, you’ll naturally include variations of the keywords in the copy while still creating content that’s designed to serve real people who access your site.

Similarly, if you understand the intent of search queries for your product, you can write in a tone that matches that intent. For example, if you know that people regularly search for specifics on something you sell, your body copy can take a “salesy” tone and include the selling points of your product.

The intent of search queries you target can inform your content choices further still—not just in terms of the copy itself, but also in terms of page design. For example, if certain queries imply that readers want to compare the feature set of one product with another, you could include a comparison table. Or, if a query is of the form “best X for Y,” you could include an ordered list.

Although there are no limitations to the amount of body content you can include (aside from user experience best practices), you want to maximize the value of your time and resources. It’s not a good use of either to write thousands of words for every page on your site, and it won’t provide a good user experience. To gauge the appropriate content length, analyze the existing search results and see what’s already ranking. This should give you an idea of how much content to produce.

Implementation of on-page SEO

On-page SEO is straightforward to implement in modern content management systems (CMSs) like Contentful, WordPress, Umbraco, or Drupal. If your site is still in the planning stage, make sure your developers build with a platform that allows you to add and edit these elements. Or, if you’re building it yourself on a platform like Mailchimp, it should be easy to apply SEO practices.

Depending on the scale of the site you’re optimizing, you might need (or want) to automate some elements of the implementation. For example, if you had thousands of meta descriptions you needed to add, a developer could use a simple script to create unique, optimized meta descriptions.

If your CMS allows you to bulk update pages on your site, you could achieve the same thing by building a CSV file for import, using the CONCATENATE function in Microsoft Excel. You could use a similar system for title tags and H1 tags, if required.

Of course, crafting individual metadata is the most comprehensive way to do on-page SEO, but it’s better to be realistic about the work requirements and automate where necessary. However, always write unique, customized body content.

Avoid duplicate content

Wherever possible, try to ensure that every page on your website has unique content. That includes the body copy, title tags, H1 tags, and meta descriptions. This helps ensure that all the pages on your site are uniquely targeted for different keywords, and it avoids confusion from the search engines.

Imagine you had 2 pages that represented 2 similar but slightly different product categories like “Strong dog leads” and “Super strong dog leads.” Let’s say you optimized the site to use the different category names in the title tags, H1 tags, and meta descriptions (making them unique), but didn’t bother to change the body copy.

Now, how does Google choose which of these pages to display in the search results? Since there is duplicate body copy, very little differentiates them. In some cases, Google omits pages that are too similar.

Similarly, be careful about using a supplier’s description for products you’re selling. You’ll end up with page content identical to the original supplier’s—and also to those of your competitors who’ve done the same thing. From Google’s perspective, if there’s nothing that differentiates your page from the others, it offers no unique value.

For these reasons, it’s essential to write unique body content for every page on your site.

Writing for SEO

The phrase “writing for SEO” is a bit of a misnomer. The way to write for SEO is to write for people—to answer the questions and queries they have—and do it in a way that’s also helpful to search engines.

On-page SEO is the starting point you need for worthwhile rankings, and it’s how you end up ranking for relevant search queries. But on-page SEO is only one part of the puzzle, and it works best in combination with a strategy for off-site SEO and backlinks.

Written by Patrick Hathaway for Mailchimp. Patrick is the co-founder of Sitebulb, a technical SEO auditing tool.

Share This Article