On-Page SEO: The Beginner’s Guide

Joshua Hardwick
Head of Content @ Ahrefs (or, in plain English, I'm the guy responsible for ensuring that every blog post we publish is EPIC).
Article stats
  • Monthly traffic 2,944
  • Linking websites 1,082
  • Tweets 677
Data from Content Explorer

Shows how many different websites are linking to this piece of content. As a general rule, the more websites link to you, the higher you rank in Google.

Shows estimated monthly search traffic to this article according to Ahrefs data. The actual search traffic (as reported in Google Analytics) is usually 3-5 times bigger.

The number of times this article was shared on Twitter.

Creating the kind of content that Google and searchers want to see is the hard part. If you’ve done that, you just need to put the icing on the cake with on-page SEO.

Keep reading to learn what that involves and how to do it.

Contents


    What is on-page SEO?

    On-page SEO is anything you can do on the page itself to improve its rankings. It focuses on helping Google and searchers better understand and digest your content.

    Why is on-page SEO important?

    Google looks at things you can influence with on-page SEO to decide if your page is a relevant search result. These include whether keywords from the query are on the page and how searchers interact with it.[1]


    Although Google looks at keywords on your page, repeating keywords is not on-page SEO. Doing too much of this will actually harm your rankings.[2] So let’s run through some sensible optimizations that will make a positive difference. 

    Use an H1 tag for your page title

    Heading tags, including the H1, help Google understand the content on your pages.[3] It’s best practice to use one H1 per page for the title.

    To find pages with missing or empty H1 tags, crawl your site with Ahrefs’ Site Audit and go to the Content report. You can do this free with an Ahrefs Webmaster Tools (AWT) account.

    Checking H1 tags in Ahrefs' Site Audit

    Use H2-H6 tags for subheadings

    Improve your content’s visual hierarchy by wrapping subheadings in H-tags. Use H2s for subheadings, H3s for sub-subheadings, etc. It makes it easier for searchers to digest and skim.

    Use subheadings to improve visual hierarchy

    Write a compelling title tag

    Title tags are often the main piece of information used to decide which result to click on.[4] This is why you need to make them compelling. Here are a few tips:

    • Keep them short. Under 70 characters is best to avoid truncation.
    • Match search intent. Tell searchers you have what they want.
    • Be descriptive. Don’t be vague or generic.
    • Don’t clickbait. Make sure they align with your content.
    • Include the keyword. Use a close variation if it makes more sense.
    • Include the year. For topics that demand freshness.
    Example of a title tag in the search results

    You should set a title tag on every indexable page. If you like, you can use Ahrefs’ Site Audit to find pages with title tag issues like being empty or too long. All you need is a free AWT account. Once you’ve signed up and crawled your site, go to the Content report to check for issues.

    Checking for title tag issues in Ahrefs' Site Audit

    Write a compelling meta description

    Meta descriptions aren’t a ranking factor,[5] but can bring more clicks and traffic. This is because Google often uses them for the descriptive snippet in the search results. Here are a few tips for writing them:

    • Keep them short. Under 160 characters is best to avoid truncation.
    • Expand on the title tag. Include USPs that you couldn’t fit there.
    • Match search intent. Double down on what searchers want.
    • Use an active voice. Address the searcher directly.
    • Include your keyword. Google often bolds this in the results.
    Example of a meta description in the search results

    You can use Ahrefs’ Site Audit to check for pages with meta description issues like being empty or too long. Once again, you’ll need a free AWT account to do this. Once you’ve signed up and crawled your site, go to the Content report to check for issues.

    Checking for meta description issues in Ahrefs' Site Audit
    DID YOU KNOW?

    Google usually doesn’t use meta descriptions for the search snippet. Our study found that it uses them only 37.22% of the time.[6] The rest of the time, it uses other content from the page.[7]

    Set SEO-friendly URLs

    If you’ve set up your website for SEO success, your URL structure should be sound. But you still need a descriptive slug for each page. Google says to use words that are relevant to your content.[8] Often the easiest way to do that is to use your target keyword. 

    Example of an SEO-friendly URL

    Optimize your images

    Images from your pages can rank in Google image search and send more traffic your way. You need to do three things to optimize them.

    Use descriptive filenames

    Google says that filenames give it clues about the image’s subject matter.[9] So dog.jpg is better than IMG_859045.jpg. Here are a few naming tips:

    • Be descriptive. black-puppy.jpg is better than puppy.jpg
    • Be succinct. black-puppy.jpg is better than my-super-cute-black-puppy-named-jeff.jpg
    • Don’t stuff keywords. black-puppy.jpg is better than puppy-dog-pup-pooch.jpg
    • Use dashes between words. black-puppy.jpg is better than black_puppy.jpg

    Use descriptive alt text

    Google also uses alt text (alternative text) to understand the subject matter of an image.[9] This is an HTML attribute used on <img> tags to describe the image. It’s not visible on the page itself and looks something like this:

    <img src="https://yourdomain.com/puppy.jpg" alt="puppy">

    The main purpose of alt text is to improve accessibility for visitors who use screen readers. These convert page content, including images, to audio.

    Here’s our best advice for creating alt text:

    • Be descriptive. Describe what’s actually in the image.
    • Be concise. Keep them as short as possible.
    • Don’t stuff keywords. Google says it results in a negative user experience.
    • Don’t say it’s an image. There’s no need to include “Image of…” or “Picture of…” in descriptions.

    You can use the Images report in Ahrefs’ Site Audit to check your site for images with missing alt text.

    Checking for alt text issues in Ahrefs' Site Audit

    Compress them

    Compressing images makes file sizes smaller, leading to faster load times. Plenty of tools exist for doing this. ShortPixel is a good option.

    Use external links

    Some people think linking to external resources is bad for SEO. There’s no evidence to suggest that. Google says linking to other websites is a great way to provide value to your users.[10] So don’t be afraid to do it where it makes sense.

    Show off your expertise

    Google values content from experts,[1] but having expertise isn’t enough. You need to make your expertise immediately obvious to readers. Below are a few ways Google advises to do that.[11]

    • Show that you know the topic well
    • Provide clear sources of information
    • Provide background information of the author, such as a link to an “author” page
    • Ensure the content is free from easily verified factual errors

    Optimize for featured snippets

    A featured snippet answers the searcher’s question with a short answer.[12] Google pulls them from web search listings, and they almost all come from one of the pages ranking in the top 10.[13] This means you can shortcut your way to the top position by winning the snippet.

    Example of a featured snippet

    The best featured snippet opportunities tend to be for keywords where:

    • You already rank in the top 10.
    • Google already shows a featured snippet.
    • You don’t own the snippet yet.

    You can find these opportunities using Ahrefs’ Site Explorer. Enter your site, then filter for top 10 rankings where you don’t own the snippet in the Organic keywords report.

    Finding low-hanging featured snippet opportunities in Ahrefs' Site Explorer

    It’s then a case of adding the answer to your page.

    Get rich snippets with structured data

    Rich snippets are search results that highlight structured data embedded on webpages. Their purpose is to give searchers summary information about a result at a glance.[14]

    Example of a rich snippet in the search results

    Structured data is not a ranking factor,[15] but it does help Google to better understand what’s on your pages.[8] They also make your website more eye-catching in the search results, which may lead to more clicks.

    Key takeaways

    • On-page SEO is anything you can do on the page itself to improve its rankings.
    • It isn’t about repeating keywords. That can hurt your rankings.
    • It is about helping Google and searchers better understand and digest your content.

    References

    1. “Ranking Results — How Google Works”. Google. Retrieved 17th August 2022 
    2. “Irrelevant Keywords and Keyword Stuffing”. Google. Retrieved 17th August 2022
    3. John Mueller. “English Google Webmaster Central office-hours” Google Search Central YouTube Channel. December 27th 2019.
    4. “Control your title links in search results”. Google. Retrieved 17th August 2022
    5. “Google does not use the keywords meta tag in web ranking”. Google. Retrieved 17th August 2022
    6. “How Often Does Google Rewrite Meta Descriptions? (New Data Study)”. Ahrefs
    7. “Control your snippets in search results”. Google. Retrieved 17th August 2022
    8. “Search Engine Optimization (SEO) Starter Guide”. Google. Retrieved 17th August 2022. 
    9. “Google Images SEO Best Practices”. Google. Retrieved 17th August 2022
    10. John Mueller. “Linking Out: Good for SEO?”. Google Search Central YouTube Channel. July 26th 2019.
    11. Danny Sullivan. “What site owners should know about Google’s core updates”. Google Search Central Blog. August 1st 2019. Retrieved 17th August 2022. 
    12. “How Google’s featured snippets work”. Google. Retrieved 17th August 2022
    13. “Ahrefs’ Study Of 2 Million Featured Snippets: 10 Important Takeaways”. Ahrefs. May 30 2017. Retrieved 17th August 2022
    14. Kavi Goel, Ramanathan V. Guha, Othar Hansson. “Introducing Rich Snippets”. Google Search Central Blog. May 12 2009. Retrieved 17th August 2022
    15. John Mueller. “There’s no generic ranking boost for SD usage”. Twitter. April 2nd 2018.
    • Monthly traffic 2,944
    • Linking websites 1,082
    • Tweets 677
    Data from Content Explorer