(Last Updated: October 24, 2014 by Rand)

How do I build the perfectly optimized page?

This is a challenging question for many in the SEO and web marketing fields. There are hundreds of "best practices" lists for where to place keywords and how to do "on-page optimization," but as search engines have evolved and as other sources of traffic — social networks, referring links, email, blogs, etc. — have become more important and interconnected, the very nature of what's "optimal" is up for debate.

My perspective is certainly not gospel, but it's informed by years of experience, testing, failure, and learning alongside a lot of metrics from Moz's phenomenal data science team. I don't think there's one absolute right way to optimize a page, but I do think I can share a lot about the architecture of how to target content and increase the likelihood that it will:

  • A) Have the best opportunity to rank highly in Google and Bing
  • B) Earn traffic from social networks like Twitter, Facebook, LinkedIn, Pinterest, Google+, etc.
  • C) Be worthy of links and shares from across the web
  • D) Build your brand's perception, trust, and potential to convert visitors

With the help of some graphics from CreativeMarket (which I highly recommend), I created a number of visualizations to explain how I think about modern on-page optimization and keyword targeting. Let's start with a graphical overview of what makes a page optimized:

larger version

In the old days of SEO, "on-page optimization" referred merely to keyword placement. Search engines liked to see keywords in certain locations of the HTML code to help indicate a page's relevance for that query. But today, this simple approach won't cut it for two key reasons:

  1. The relevancy and keyword-based algorithms that Google and Bing use to evaluate and rank pages are massively more complex.
  2. Gaining a slight benefit in a keyword placement-based algorithmic element may harm overall rankings because of how it impacts people's experience with your site (and thus, their propensity to stay on your pages, link to you, or share your content socially — all of which are also directly or indirectly considered in ranking algorithms).

Below is a pie-chart breakdown of how the 128 SEO professionals surveyed for Moz's annual ranking factors project rated broad algorithmic elements' impact in Google:

larger version

If <15% of the rankings equation is wrapped up in keyword targeting, no wonder smart SEOs in the modern era have evolved to think more holistically. Personally, I'm happy to sacrifice "perfect" keyword placement in the title element or a URL for better user experience, a higher chance of having my content shared on social networks, or a better click-through rate in the search results.

But, for the purposes of this post, let's put some of those caveats aside and dive into the best practices for each element of a page. It may be unwise to optimize all of these purely towards search engine-based best practices, but we can temper the advice with notes on usability and user experience for visitors, too. Below, I've attempted to go tag by tag, and element by element through the keyword targeting and on-page optimization canon to expand on the more basic advice in the "Elements of an Optimized Page" graphic above.

Uniquely valuable

An optimized page doesn't just provide unique content, but unique value. What's the difference?

  • Unique content simply means that those words, in that order, don't appear anywhere else on the web.
  • Unique value refers to the usefulness and takeaways derived by visitors to the page. Many pages can be "valuable," but few provide a truly unique kind of value — one that can't be discovered on other pages targeting that keyword phrase.

Whenever I advise marketers on crafting pages, I ask them to put themselves in the minds of their potential visitors, and imagine a page that provides something so different and functional that it rises above everything else in its field. Here are a few of my favorite examples:

  • The Baby Name Wizard — a terrific page that provides clear value above and beyond its competition for searches around baby names.
  • How Much Does a Website Cost — Folyo surveyed their designers to create a distribution of prices that accurate, credible, and massively valuable to those seeking data on pricing.
  • Scale of the Universe — this interactive feature will take you from the tiniest parts of an atom all the way to universe-scale. No wonder it ranks for such abstract queries as "the size of things."
  • The Best Instant Noodles of All Time — The Ramen Rater has tried literally thousands of packets of instant noodles and determined these ten to be the outstanding few. I'm actually excited to try them :-)
  • Top Social Networks by Users — Craig Smith puts together an update to this list every month or two, and has compiled this invaluable resource to help those of us wondering just how big all the networks are these days. I've personally used this for numerous posts and presentations — it's an excellent example of creating unique value by aggregating data from varied sources (and it, deservedly, outranks stalwarts like Nielsen as a result).

Unique value is much more than unique content, and when you have a page that rises to the level that these do, social shares, links, and all the other positive associations, branding, and ranking signals are apt to follow.

Provides phenomenal UX

A user's experience is made up of a vast array of elements, not unlike the search engines' ranking algorithms. Satisfying all of these perfectly may not be possible, but reaching for a high level will not only provide value in rankings, but through second-order impacts like shares, links, and word-of-mouth.

At the most basic level, a great UX means the page/site is:

  • Easy to understand
  • Providing intuitive navigation and content consumption
  • Loading quickly, even on slower connections (like mobile)
  • Rendering properly in any browser size and on any device
  • Designed to be visually attractive/pleasing/compelling

Smashing Magazine has my favorite article on the subject: What is User Experience Design? Overview, Tools, and Resources.

Crawler/bot accessible

Search engines still crawl the web using automated bots, and probably will for at least the next decade or more. While there have been plenty of leaps in the sophistication level of these crawlers, the best practice is not to take chances and follow some important guidelines when building pages you want engines to crawl, index, and rank reliably:

  • Make sure the page is the only URL on which the content appears, and if it's not, all other URLs canonicalize back to the original (using redirects or the rel=canonical protocol)
  • URLs should follow best practices around length, being static vs. dynamic, and being included in any appropriate RSS feeds or XML Sitemaps files
  • Don't block bots! Robots.txt and meta robots can be used to intelligently limit what engines see, but be cautious not to make errors that prevent them from crawling and indexing your content.
  • If the page is temporarily down, use a status code 503 (not a 404), and if you're redirecting a page to a new location, don't go through multiple redirect chains if possible, and use 301s (permanent redirects), not other kinds of 30x status codes.

Geoff Kenyon's Technical Site Audit Checklist is still one of the best resources for those seeking more in-depth information about crawler-based accessibility.

Keyword-targeted

As I mentioned in the opening of this post, it may be the case that perfectly optimized keyword targeting conflicts with goals around usability, user experience, or the natural flow of how you write. That's OK, and frequently, I'd suggest leaning in those more user-centric directions. However, when it's possible to optimize keyword usage, you'll need some ammunition. Here's a look at the most important elements as we've observed them through time, testing, correlation, and listening to the engine's recommendations, too.

7 important keyword targeting elements (and 1 not-so-important element)

#1: Page title

Using the primary keyword phrase at least once in the page's title, and preferably as close to the start of the title tag/element as possible is highly recommended. Not only are titles key to how engines weigh relevance, they also dramatically impact a searcher's propensity to click.

Above is an example comparing some title elements for the search query "lip balm." The tag for allure.com is more compelling from the perspective of fulfilling the searcher's intent (which is likely to compare multiple balms vs. find a specific one), but it also puts the keyword in prime, eye-catching real estate on the results page. We have seen evidence and heard the engines themselves discuss the value/importance of earning clicks and preventing " pogo-sticking" (the bouncing of a visitor back to a search page after clicking a result). Optimizing for both keyword prominence AND user intent/visibility is an excellent idea.

#2: Headline

While we've seen mixed results over the years with using the H1 tag specifically for keyword placement, it's almost certainly the case that a searcher who's just clicked on a results expects to see a matching headline on the page they visit. Failure to do so may increase the odds of pogo-sticking, and our most recent rank correlations suggest that a topically relevant H1 is associated with higher rankings.

I wouldn't always require a match between the title and the H1 precisely, but they shouldn't be so dissimilar as to drive anyone who's clicked away from the result.

#3: Body text

It should come as no surprise that using your primary (and secondary, if relevant) keyword phrase(s) in the content of the page are important. Our research suggests that it's not just about raw keyword use or repetition, though. Search engines are almost certainly using advanced topic modeling algorithms to assess relevance and perhaps quality, too.

This means it's wise to make your content comprehensive, useful, and relevant as possible, not just filled with instance of a keyword. In fact, we've observed plenty of cases where the overuse of keywords resulted in a negative impact on rankings, so be judicious. If you asked a non-marketing friend to read the page, would they get the sense that a term or phrase was suspiciously prominent, sometimes needlessly so? If that's the case, you're probably overdoing it.

#4: URL

A good URL has a few key aspects, but one of those is keyword use. Not only does it help with search engine relevancy directly, but URLs often get used as anchor text around the web (mostly through copying and pasting). For example, if I link to this post using its URL, e.g. https://moz.com/blog/visual-guide-to-keyword-targeting-onpage-optimization, the phrases "keyword targeting" and "onpage optimization" appear right in the text.

For more best practices on URLs, check out our learn article on the topic.

#5: Images and image alt attributes

Having images on a keyword-targeted page is wise for many, many reasons, not least among them is that these can help directly and indirectly with rankings. Most directly, your image has an opportunity to show up in an image search result. Granted, Google's new interface has dramatically lowered the traffic from image search, but I still find great value in having your brand name/site associated with production of useful graphics, photos, and visual elements.

For search engines, the image's title, filename, surrounding text, and alt attribute all matter from a ranking perspective. In particular, those doing SEO should know that when an image is linked, the alt attribute is treated similarly to anchor text in a text link.

#6: Internal and external links

A good page should be accessible through no more than four clicks from any other page on a site (three for smaller sites), and it should, likewise, provide useful links to relevant information on any topics that are discussed.

Some SEOs have, in the past, questioned whether linking externally, especially to sites/pages that might compete for a visitor's time/attention or a search engine's rankings is wise. I believe the nail in that coffin was delivered by Marshall Simmonds in his Whiteboard Friday Interview noting the value the NYTimes saw from their implementation of external links. Since then, search engine representatives have subtly hinted on multiple occasions that there are elements in the algorithm which reward external links to quality sites/pages.

#7: Meta description

A page's meta description isn't used directly in search engine ranking algorithms (according to representatives from Google and Bing), but that doesn't mean they're not critical. The meta description tag, if it employs the keyword query, usually shows up in the search results, and is part of what searchers consider when deciding whether to click.

As you can see from the snippet above, when keywords appear in the meta description, they also get bolded, which can help with visibility. The primary goal of a meta description should be to earn the searcher's click. Think of them like ad copy, and work to make searchers care about your page.

#8: Meta keywords

Notably absent from this list is the Meta Keywords tag, which Google does not use in rankings, and we, along with many others (including SearchEngineLand) recommend against employing on your pages.

-----------

The reason it's so important to balance these keyword-targeting demands with other attributes of on-page optimization is illustrated below:

larger version

As you can see, while on-page features like keyword use in titles, keywords, and body text (even when measured via a more sophisticated and higher correlating model than just raw usage like our data science team did in the ranking factors) have reasonable correlations given the complexity of Google's rankings, other elements are found much more often in higher- vs. lower-ranking pages.

If social shares, brand mentions, links, and domain authority all potentially trump keyword-based factors as differentiators, marketers need to make sure we're hitting the basics of on-page, but never extending in such a way that interferes with our ability to succeed in these other avenues.

Built to be shared through social networks

Facebook, Twitter, Google+, LinkedIn, Pinterest, Reddit, and dozens more social networks that are niche-focused can help earn signals that help rankings directly and/or indirectly (often through exposure to folks who might link to them).

A well-optimized page should help to make social sharing as easy and seamless as possible, including:

  • Using obvious social sharing buttons that are targeted to the page's audience. Don't just list every network on the web — be empathetic and predictive of what your visitors are likely to employ.
  • Craft URLs that are short and descriptive so that copying/pasting (for those who prefer) is painless, and whenever/wherever those links appear they provide a good UX for those seeing them. This is particularly important across more niche social sites, forums, and Facebook/Google+ (which use full URLs if the length is short rather than the condensed versions that Twitter uses).
  • Make content that has inherent, spreadable value. Think about a social influencer and ask yourself, "would I share this page if I came across it?" Find ways to make that answer yes. One of the best is to build pages that will make social sharers themselves look good to their audiences (either because the page helps promote them directly/indirectly or because the unique value is so compelling, their followers/fans will be indebted to them for finding it).
  • If possible and relevant, employ features like Twitter Cards and Facebook's OpenGraph markup to get the additional benefits on those networks.

Given how the reach of social networks have grown, how well social shares correlate positively to higher search rankings, and how those correlations have risen over time, there's a lot of value in making sure your pages have an opportunity to perform socially.

Multi-device ready

Although it was called out in the UX section, this principle is worthy of its own headline due to the increasing diversity of devices, browsers, and screen sizes. Mobile use isn't just critical for users "on the go." Many are using mobile or tablets to browse at home, at work, and as a replacement for laptop/desktop. And they're not just consuming — they're sharing! Social sharing in particular is a huge part of mobile & tablet functions, which means that if you're not optimized for all devices, you're missing critical opportunities for amplification to a broader audience.

Inclusive of authorship, metadata, schema, and rich snippets

There are a vast array of options that provide additional markup that engines may employ in their listings. Rather than try to list all of them, I'll link to resources with more information on each:

Moz's marketing scientist, Dr. Pete, recently put together a slide deck showing 90+ unique forms of search results, many of which leverage rich forms of markup (though only a few of these are in the control of the marketer/creator).

My recommendation is to apply those that both match the opportunities provided by the engines and the techniques that will give value to your potential visitors. Be cautious of going overboard — there's a bit of rich snippet spam that serves only to leave a bad taste in searchers' mouths and may hurt your reputation or rankings with the engines themselves, too.


Choosing how to optimize

One important takeaway from this post should be that modern on-page SEO is about juggling competing priorities. In general, my recommended ordering of those priorities is as follows:

  1. Create a page that is uniquely valuable to your targeted searchers.
  2. If at all possible, make the page likely to earn links and shares naturally (without needing to build links or prod people).
  3. Balance keyword targeting with usability and user experience, but never ignore the critical elements like page titles, headlines, and body content at the least.

There's no such thing as "perfectly optimized" or "perfect on-page SEO," but I took a stab at drawing up the mythical beast anyway:

larger version

Over time, what's "perfect" might change, and new services, platforms, and areas of optimizational opportunity could arise. But for the past few years (notwithstanding some newer tactics like Google's rel=author), the model described in this post has held relatively stable. The "O" in SEO is getting broader, and I think that's a wonderful thing for marketers of all stripes. Targeting an algorithm instead of people is far worse than hitting both birds with the same handful of optimization stones.

p.s.: If you have feedback or suggestions on items to include, please feel free to suggest them in the comments.