On-page SEO, element by element
On-page SEO is everything you decide on the page itself: the title tag, the meta description, the headings, the text, the images, the internal links and the URL. This lesson opens each element separately and says which ones actually matter and which are only habit.
- Lesson 5 of 15
- Beginner
- Free, no signup
Four things you decide on the page itself
The numbers point at the parts, not at their exact positions; this is a sample frame, not your page.
-
1
The URL
Short and readable. Do not change it on a page that ranks.
-
2
Main heading and subheadings
One main heading, and subheadings that are the reader's questions, not abstract nouns.
-
3
Image: file name, alt text, dimensions
Alt text for someone who cannot see it; width and height so the text does not jump.
-
4
Internal link
An a tag with a real address, and text that describes the destination.
Two important elements are missing here because they are not on the page: the title tag and the meta description appear only in the page code and in the Google result.
Last checked: Facts and tool names in this lesson are re-checked against their sources on this date.
What is on-page SEO, and what is not?
On-page SEO means the things you decide inside the editor of that one page. Server speed, URL structure, sitemaps and redirects are a different job, and its name is technical SEO. The links other sites give you sit outside your hands as well.
This separation is not a matter of vocabulary. Most on-page checklists mix a few technical items in, and the result is a content writer blaming themselves for work they never had access to.
The list of what is genuinely yours is short: the title tag, the meta description, the main heading and the subheadings, the text itself, the images with their file names and alt text, the internal links and their link text, and the URL. Eight things. If you want the same subject in checklist form to tick off at publish time, the on-page SEO checklist was written for that; this lesson explains why each item is on it.
The title tag: the thing people see in the result
The title tag is not visible on the page. It lives in the page code, and its job is to be displayed in the Google result, in the browser tab and in social sharing. The main heading, the one a reader sees above the text, is a different thing and does not have to match it.
Google itself says it does not always use the title tag and may generate a different title based on what is in the page. So the title is a strong proposal, not an instruction. The best you can do is make the proposal accurate enough that replacing it makes no sense.
Three practical rules. Put the main phrase near the front, because the end of a title gets cut off on mobile. Write the title for a click and not for a crawler: the number in it, the year in it, or the way it differs from the other results is what wins the click. And write a unique title for every page; two identical titles mean you do not know what separates those two pages either.
Revisit one habit as well: the site name at the end of every title. If your brand is known, those few characters build trust and earn their space. If it is not, they only took the room where your most useful words would have gone, and on mobile they are the first thing cut.
The figure everyone quotes as the correct length, around sixty characters, is a display convention and not Google policy. Google has published no character limit; what actually exists is the pixel width that fits in the result.
What does the meta description do, and not do?
The meta description does not affect ranking. We have known this for years and someone still asks every week why filling it in changed nothing. What it does is this: it is the text under the title in the Google result, the two lines that decide whether the user clicks you or the next result.
Google frequently replaces that text with a piece of the page itself, especially when the user's query matches something in the body better. Do not read that as a failure; it means your page had the answer.
Leaving it empty is a choice too, not an automatic mistake. If it is empty Google takes a piece of the page itself, and on informational pages that is often not a bad pick. On a page that sells, do not take that risk: there, the two lines under the title are what the user compares between you and a competitor.
So how do you write it. One sentence that states the thing the user wants, not an introduction to yourself. A phrase like "a complete and comprehensive guide about" gives nobody anything. Say instead what specifically is inside the page: which number, which comparison, which answer. And if it is a sales page, write the thing that is there and is not anywhere else.
What you decide and what Google decides for itself
You decide
- The title tag text and where the main phrase sits in it
- Whether every page has a unique title
- The meta description text and what specific thing it promises
- Whether the page actually holds what was promised
Google decides
- Whether your title is shown or another one is generated
- Whether the meta description is shown or a piece of the body
- How much fits in the result, which is a width and not a character count
- Which block of the results page you appear in
The second column is not a failure: Google replaces a title or a description when something in the page matched the user's query better.
Arrange the headings for the reader
A page has one main heading and it names the subject of the page. The subheadings under it each open one section, and their order is the order in which a reader asks their questions.
The common mistake is choosing headings for the search engine: an abstract noun phrase like "the importance of on-page SEO" that nobody ever types. A good heading is the question already in the reader's head: "how many H1s should I have?" or "how do I write alt text?".
Do not skip levels. If you jump from a second level heading straight to a fourth because the font is smaller, the structure of the page is lost; font size is a styling job, not a heading job. And several headings in a row with the same grammatical shape, all of them starting with "how to" for instance, make the page read as machine made. Vary the shape.
Who are you writing image alt text for?
Alt text is written for someone who does not see the image: a user reading with a screen reader, or a browser where the image did not load. That Google reads it too is a side effect, not the purpose.
So write it properly: a description of what is actually in the image, in a short phrase. If the image is a chart, say what the chart shows rather than writing the word "chart". And if the image is purely decorative, leave the alt text empty; empty is a correct choice, not a forgotten field.
Two other things get done at the same moment and matter more than the alt text. First the file name: a descriptive name instead of a string of digits. Second the image width and height: if they are not in the page code, the browser does not know how much room to keep and the text jumps when the image arrives. That jump is one of the three main page experience metrics, and unlike much else it is entirely in your hands.
Internal links: the cheapest work most people skip
An internal link is a link from one page of your own site to another page of the same site. It costs nothing, needs nobody's permission, and in practice gets done less than any other task.
It does two things. First, it tells Google which of your pages matter and how they relate. Second, and more importantly, it moves a reader from the page where they learned something to the page that does the job. That is the commercial path of an educational site, with no hard sell anywhere in it.
Choose the link text carefully. "Click here" tells nobody what the destination is, neither the user nor Google. The link text should describe the target page, and for one given page it should vary a little each time. A hundred links with exactly identical text is a pattern you built yourself.
One working habit makes a real difference: the day you publish a new page, link to it from three older related pages that same day. A page nothing else points at does not exist as far as the structure of the site goes, even if it is in the sitemap. This takes five minutes and almost nobody does it.
One technical detail that looks simple and gets broken constantly: a link has to be an a tag with a real address in href. A button that moves the user with JavaScript works for the user and is not a link for a crawler. Google's own documentation says precisely this.
One internal link, two pages and the text standing between them
The educational page
answers the question and stops there
- Collects informational traffic
- Should not be turned into a sales page
The service page
does the job
- Answers the transactional intent
- Gets links from several educational pages
What decides the quality of this link is the link text itself
The link text
the few words both the user and the crawler read
- Describes the destination page, not "click here"
- Varies a little each time for the same destination
- Sits inside a sentence, not in a block of links at the bottom
One link from a page nobody reads does nothing. The effect of internal linking comes from how many pages point at one destination.
The URL: get it right once, then leave it alone
A good URL is short, separated with hyphens, and readable enough to tell you what the page is about. Do not put a date in it unless the page really is news, because that page will look old next year without its content being old.
The main point of this section is a warning rather than a guideline. Do not change the URL of a page that ranks. All of that page's history is attached to that address, and changing it means starting from zero unless a permanent redirect from the old address to the new one goes in at exactly the same moment.
And if you do have to change something, change one thing at a time. Do not move the title, the URL and the text on the same day; if the ranking shifts afterwards, you will never know which one caused it.
The fast path, with AI
Writing a title and description for one page takes ten minutes; for a hundred pages it takes a week. A language model genuinely moves that forward, with one condition people usually skip: you have to hand it your existing titles too, otherwise you get five suggestions that all look like each other and like the rest of the web. A stronger model beats a cheap one here, because the work is finding an angle rather than translating; our current pick is in the <a class="text-link" href="/en/ai/">AI section</a>.
- Put the main heading, the first paragraph and the target phrase side by side. If the page is not written yet, write the text first; the title comes out of the text and not the other way around.
- Copy in the titles of ten to fifteen of your existing pages as well. That is the step that saves the output from cliche.
- Run the recipe below and, from the five suggestions, pick the one you could tell apart from a competitor.
- On a page that already ranks, change the title one page at a time and watch the result. Do not rewrite every page at once; if a ranking moves, no way is left to find out why.
Copy-ready recipe
Role: writer of titles for search results. Write plainly, not in corporate register.
Page information:
Main heading: {heading}
First paragraph: {paragraph}
Target phrase: {phrase}
What this page does for the reader: {one sentence}
The current titles on my site (so you do not sound like them):
{ten to fifteen titles}
Output:
1. Five title options. Each under sixty characters, the target phrase near the front, each with a different angle. Under each one, write a single line naming its angle.
2. One meta description between one hundred and forty and one hundred and sixty characters saying exactly what is inside the page.
3. Tell me which of the five is closest to my current titles, so I can set it aside.
Rules:
- Write no number, date, brand name or claim that is not in the input.
- No advertising adjectives: best, complete, comprehensive, revolutionary.
- No exclamation marks. Question form only if the page really answers a question.
- The five titles must not share one syntactic shape; if three of them start on the same pattern, write them again.
Before you trust the output: Two things you have to check yourself. First the real length: a model does not count characters reliably and Google sees width rather than characters anyway, so look at the chosen title and description in an actual result. Second and more importantly, the pattern: run this recipe across a hundred pages and you get a hundred titles with one writing cadence, and that uniformity is itself a fingerprint. Rewrite at least one title in three by hand. And on a page that ranks, never change the title, the URL and the text together.
AI in this kind of work
In on-page work, AI is good for drafting and not for deciding. Titles, descriptions and alt text can all be drafted; but which page takes which phrase, and when the title of a ranking page changes, are decisions, and decisions belong to whoever lives with the consequences.
Tools that actually help
- Google Search Console Before changing a page's title, look at the phrases it already gets impressions on. A title that ignores those phrasings usually lowers impressions rather than raising clicks.
- Claude A good fit for finding a title angle and rewriting descriptions, because it takes constraints and writes down its reasoning. Iran is not on Anthropic's supported-countries list and there is no official payment route from Iran.
- Gemini For image alt text, because it can see the image and describing beats guessing. Google's own page says the Gemini web app runs in over 230 countries and territories, and Iran is not on that list.
- RGB The access and payment layer for Iran, kept separate from the tools themselves.
Where it backfires
The risk here has an unexpected shape: the danger is not one bad title, it is a hundred good ones that resemble each other. One model with one fixed recipe produces one writing cadence, and a site whose two hundred titles share a rhythm has built a pattern visible to a reader and to any detection system. Google has put the question elsewhere and said it plainly: the focus is on worthless content produced at scale, not on which tool produced it. The second risk is more concrete: alt text for an image the model never saw is not a description, it is a guess. If the model has no access to the image, write it yourself.
Sources: Google Search Central: control your title links in search results Google Search Central: spam policies (scaled content abuse) Google Search Central: Google Images best practices (alt text)
Where this advice stops
On-page SEO is necessary and not sufficient. On a phrase with no demand, or on a site nobody links to and which has no history, even a flawless title changes nothing. And none of the numbers repeated in this field, sixty characters of title and a hundred and sixty of description, are published Google policy; they are display conventions derived from the real width of a result, and they move when the results page is redesigned.
From our own work
On this very site the title tag and the main heading are deliberately different, and you can test it right now. Our keyword research page has a two word heading that names the topic only, while its title tag is longer and also names the free tool, because the heading is for someone already on the page and the title is for someone still standing in the results page choosing between ten options. The technical detail that surprises people is that the two are not even in the same database table: the heading lives in the post row, and the title Google sees comes from the rg73_yoast_indexable table. Changing a page's heading in the editor does not change what gets printed in the Google result.
Real follow-up questions
How long should a title tag be?
Google has published no character limit. The number everyone repeats, around sixty characters, comes from the real width of a result and is even less on mobile. The practical move is to put the main phrase first, so that nothing essential is lost if the end gets cut.
Does the meta description affect ranking?
No. It affects the click-through rate, which is a different thing. Google also replaces it regularly with a piece of the page itself, especially when the body matches the user's query better.
How many H1s should a page have?
One. The HTML standard does not forbid more and Google does not treat it as an error, but there is no upside either. One main heading means the page has one subject, and that is clearer for the reader and for the crawler alike.