SEO Code: The Tags Every Page on Your Website Needs

SEO Code: The Tags Every Page on Your Website Needs

The Final Code

You right-click your own homepage, pick View Page Source, and a new tab fills with code you didn’t write. You scroll, squint, and find one line you can actually read: <title>Home</title>. That word is the headline Google has been offered for your business on every search, possibly for years.

“SEO code” isn’t a secret script you buy. It’s a short list of ordinary HTML lines that tell Google what a page is, what to call it in results, and whether to show it at all. As an SEO company in Santa Barbara that has been doing this since 2008, we read these lines first on every site we take over, because they’re cheap to fix and expensive to get wrong.

What sits in the head of a page

Most of the code that matters lives between <head> and </head>, near the top of the source. Visitors never see it on the page. This is what a clean one looks like for a single service page.

water-heater-repair/ (view source)example
<head>
  <meta charset="utf-8">
  1<title>Water Heater Repair in Ventura | Mesa Plumbing</title>
  2<meta name="description" content="Water heater repair and replacement in Ventura and Oxnard. Licensed plumbers, upfront pricing, same-week appointments.">
  3<link rel="canonical" href="https://www.example.com/water-heater-repair/">
</head>
  1. 1Title element. One of the sources Google uses for the blue headline in results, and the text on the browser tab.
  2. 2Meta description. A short summary Google may use as the gray text under the headline.
  3. 3Canonical link. Names the one address you want counted for this page.
Mesa Plumbing is a made-up business, used only as an example. Scroll the code sideways on a phone.

One tag you won’t find in that example is meta keywords. Plenty of older sites still carry a long list of them. Google’s documentation is direct: The meta-keyword tag is not used by Google Search, and it has no effect on indexing and ranking at all.

Your title is the headline on Google

Google’s first instruction on titles is the simplest one on this page: Make sure every page on your site has a title specified in the <title> element. The next one is aimed at exactly the homepage in our opening: Avoid vague descriptors like “Home” for your home page, or “Profile” for a specific person’s profile.

Each page should get its own title, too. Google warns against repeated or boilerplate text in <title> elements, and against stuffing, noting that keyword stuffing can make your results look spammy to Google and to users. A good pattern is the service, the place, then your name, like the Mesa Plumbing example above.

Google doesn’t promise to use your title word for word. It says it uses a number of different sources to automatically determine the title link, and those sources include the title element, the main visual title on the page and heading elements. A clear title that matches the page’s main heading gives it the least reason to look elsewhere. Writing one a stranger will click is the same skill as writing a search ad headline, which is a big part of Google Ads management, except nobody bills you for the click.

A meta description Google may or may not use

Google doesn’t always show your meta description. In Google’s words: Snippets are primarily created from the page content itself. However, Google sometimes uses the meta description HTML element if it might give users a more accurate description of the page than content taken directly from the page.

That makes it worth writing well, not worth agonizing over. Google’s guidance is to create descriptions that accurately describe the specific page, and it points out that Identical or similar descriptions on every page of a site aren’t helpful when individual pages appear in search results. There’s no magic length either: There’s no limit on how long a meta description can be, but the snippet is truncated in Google Search results as needed, typically to fit the device width.

If you use a site builder, you probably won’t type any of this into raw code. Google notes that your CMS might have a search engine settings page or some other mechanism to tell search engines about meta tags. That settings box is where the title and description go.

Want to know what your site's code is telling Google? Get My Free Market Assessment

Headings and alt text, down in the body

Below the head, two more pieces of code carry real weight. The first is your headings, the <h1> through <h6> tags. Google suggests making the main title stand out, for example by putting the title text in the first visible <h1> element on the page. You can stop worrying about the rules people repeat about heading order, though. Google’s starter guide says from Google Search perspective, it doesn’t matter if you’re using them out of order, and There’s also no magical, ideal amount of headings a given page should have.

The second is alt text, the description inside an image tag. Google calls it The most important attribute when it comes to providing more metadata for an image and says it uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image. Write what the photo actually shows, the way you’d describe it to someone on the phone. Google’s guidance is to focus on useful, information-rich content that uses keywords appropriately and is in context of the content of the page.

image tagsexample
<!-- Says nothing -->
<img src="IMG_4471.jpg">
<!-- Says what the photo shows -->
<img src="tankless-water-heater-install.jpg" alt="Tankless water heater mounted on a garage wall after installation">

The file name helps a little as well. Google says it can give Google very light clues about the subject matter of the image, and its own example is that my-new-black-kitten.jpg is better than IMG00023.JPG.

Two lines that can hide a page

The robots meta tag tells search engines whether a page may appear in results. Most pages don’t need one. Google says that without a noindex rule, the page, media, or resource may be indexed and shown in search results. The dangerous value is noindex, which Google defines as Do not show this page, media, or resource in search results. It’s the right tool for a thank-you page or a private login. Left on a service page, often from when the site was being built, it quietly removes that page from Google.

The canonical tag is the other one to check. It points at the address you want treated as the real version of a page. Google calls it A strong signal that the specified URL should become canonical and recommends that you Do include a rel=“canonical” link on the canonical page itself (also known as a self-referential canonical). What to watch for is every page on the site pointing its canonical at the homepage, which asks Google to treat all of them as copies of the homepage.

/water-heater-repair/example
<meta name="robots" content="noindex">
<link rel="canonical" href="https://www.example.com/">
Hidden from results, and pointing at the homepage
/water-heater-repair/example
<!-- no robots tag: indexing allowed -->
<link rel="canonical" href="https://www.example.com/water-heater-repair/">
Allowed in results, and pointing at itself

LocalBusiness schema for a service business

Structured data, often called schema, is a block of code that states facts about the business in a format machines read without guessing. Google describes it as a standardized format for providing information about a page and classifying the page content, and it recommends the JSON-LD format, calling it the easiest solution for website owners to implement and maintain at scale.

For a local business, the type to know is LocalBusiness. Google’s documentation lists only two required properties, name and address, with recommended ones such as telephone, url, priceRange and openingHoursSpecification. It also says to Use the most specific LocalBusiness sub-type possible, so a plumber uses Plumber, not the generic type.

LocalBusiness JSON-LDexample
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Plumber",
  "name": "Mesa Plumbing",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "100 Example Ave",
    "addressLocality": "Ventura",
    "addressRegion": "CA",
    "postalCode": "93001",
    "addressCountry": "US"
  },
  "telephone": "+18055550142",
  "url": "https://www.example.com/",
  "priceRange": "$$",
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
      "opens": "07:00",
      "closes": "17:00"
    }
  ]
}
</script>

A made-up business at a made-up address with a 555 number. Swap in your real details, exactly as they appear on your Business Profile and your contact page.

Two rules keep this honest. Google says don’t add structured data about information that is not visible to the user, even if the information is accurate, so every fact in the block should also be on the page. And the review and rating properties that plugins love to add come with a catch: Google says they’re only recommended for sites that capture reviews about other local businesses. Pasting your own star average into your own schema isn’t what they’re for.

The same facts belong everywhere: your schema, your contact page and your Business Profile should agree to the digit. Keeping them in agreement is ordinary local SEO housekeeping, and it’s often the first thing out of date.

Open the source and search it

You don’t need a tool to look at any of this. In Chrome, Edge or Firefox on Windows, press Ctrl+U on any page. In Chrome on a Mac, it’s Option+Command+U. Then use find (Ctrl+F or Command+F) and search the source for each of these:

  1. <title There should be one, and it should name the page, not say "Home" or repeat the same words as every other page.
  2. name="description" One per page, written for that page.
  3. noindex On a page you want customers to find, this should come up empty.
  4. canonical It should point at the page you're looking at, not the homepage.
  5. ld+json If you're a local business, this is where your LocalBusiness block would be. Google's Rich Results Test is an easy and useful tool for validating your structured data.
  6. alt= Look at what's inside the quotes. Empty, or a camera file name, means Google gets nothing from the photo.

One caution. View Source shows the page as your server sends it. Some sites add tags afterward with JavaScript, and Google says it can read JSON-LD data when it is dynamically injected into the page’s contents. If something seems missing, run the page through the Rich Results Test before assuming it’s gone.

Tags nobody checked after launch

None of these lines is hard to write. The trouble is that they’re invisible on the page, so they get set once at launch and never looked at again. A new service page goes up with a copied title. A plugin adds a noindex. The phone number changes on the Business Profile but not in the schema. If you’ve paid for SEO for years and your homepage title still says “Home,” that’s BSEO: paying for something and not knowing what you bought.

Clean, accurate tags matter beyond the blue links, too. When we do AI search visibility work, the page’s head and its structured data are the first things we check, because a page that clearly states what it is and who it belongs to leaves less for any machine to guess.

Sources: Google Search Central documentation, "Influencing your title links in search results," "Control your snippets in search results," "Introduction to structured data markup in Google Search," "Local business (LocalBusiness) structured data," "Robots meta tag, data-nosnippet, and X-Robots-Tag specifications," "How to specify a canonical URL with rel="canonical" and other methods," "Google image SEO best practices," "Meta tags and attributes that Google supports," "SEO Starter Guide."

Find out what your site's code is saying about you.

Send us your website. We'll read the titles, descriptions, robots tags, canonicals and schema on your key pages, show you the searches you're found for and the ones you're missing, and tell you what to fix first. No charge, and no obligation. Or call or text 805.243.8321.

Get My Free Market Assessment

Tags are one layer of the work. The rest of it is in how we approach SEO.

What clients say about working with us.

Word for word. Read them all on Google

  • We are very pleased with the website that the team at the Final Code created for us and with the training they provided on how to control our site. Our customers are also impressed with our site and comment on how good it looks.
    Kaylor Painting Google review, Jul 9, 2016
  • I started my business about 6 months ago and couldn't get my key words anywhere in search engines after burning through a few hundred dollars trying google adwords with no results I went to the Final Code. Now I am on page one or two of every category I am attempting and moving up all of they time. Larry and his crew teach you what you need to maintain a competitive web site that brings results. They are fun to work with. You could spend thousands on an outside company to optimize your website of a fraction of that with Final Code and learn how to do it yourself. Highly recommend them
    Nancy Barna Google review
  • This company saved my sanity! I was looking for a company that allowed me to have the freedom to do what I needed/wanted to do with my website and also offer excellent customer service. I struck gold! The Final Code team is super supportive. They never leave me hanging if I have questions or need assistance. Their software allows me complete control of our site. It has made having a website fun again! I would highly recommend them!
    Channel Islands Sportfishing Google review
  • Several web companies have created and hosted my website over the last 20 years. Never before have I received the service, support, and training that The Final Code provides. They respond immediately to my needs and sincerely want me to succeed. The Final Code has designed my site so that I have access to all my pages. I am able to make immediate changes to the text and images, whenever I desire. I love playing with my beautiful website and I love the Final Code for making it possible!!! PS I am grateful for the great response to my site from new clients. People are finally finding me because of The Final Code's SEO.
    Nomi Wagner Google review, Jun 29, 2016
  • Everyone at The Final Code has been so helpful .. Larry is always just a phone call away. Not being very computer savvy I am always relieved that Larry is willing and able to make the changes and additions to my website keeping all of my Surfcat Cafe & Adoptions followers up to date. As a nonprofit we were very grateful that they were understanding about our financial situation and were very reasonably priced. Thanks Final Code!! Leslie Weiss Surfcat Cafe & Adoptions
    Leslie Weiss Google review, Jun 17, 2016
  • In our line of work we get SEO/Web Marketing calls all day and to say the least my least favorite of calls. However We have been working with the Final Code for Almost 2 years now and they are top notch in customer service and know exactly what they are doing. My SEO Stats prior to the final code i thought was impressive for a small company of our nature, however after the final code.. WOW. My numbers have almost tripled this year alone and the business reflects those numbers. The team at the final code is top notch and extremely friendly. With their web code program i can go in and create, edit and screw up any page of my website in a flash (not recommended!) and the best part is these guys are always right on the button to fix my mistakes same day. We have had a great working relationship and if you truly want Free Google Placing, SEO tracking and of course local 805 business they are the guys to contact. We highly recommend them!
    Channel Islands Helicopters Google review
  • Working with Larry and the rest of The Final Code team has been fantastic! We originally had our website built by an independent web developer and it was a nightmare dragging on for months. It got to the point where we fired the guy and started looking for a professional web development company to finish the project. We found The Final Code and from the very beginning the process went so smoothly and the website was up and running in just weeks! I’ve worked for and with other web development agencies before and by far The Final Code has exceeded all my expectations – very professional, quick turnaround times, and Larry was beyond knowledgeable on building the best website to attract the most traffic. The best part was how the website was built so I can maintain it myself and Larry is there to teach me all that I need to know. I highly recommend The Final Code for all your website needs!
    Macy Homes Google review, Jul 2, 2016
  • These guys are great! I have 5 million questions and they are quick to help. Check them out!
    Molly Carroll Google review, Feb 19, 2016
  • I was referred to The Final Code by a support person at Xero Accounting, an online accounting app I use and support for clients. I had a website up and running for over 2 years, and knew that little or no search traffic was driven to the site, datapro.la. I spoke first to Larry Murphy, and then with Carlo Godoy and James Nisky. They spent a good deal of time with me, going over what they offer, and after takig a look at my existing site, made some recommendations. I am quite computer-literate, but website-dumb. They were patient with me, explaining until I had a good preliminary understanding. Feeling that I was in good hands, I decided to move forward with them redoing, and educating me on how to redo what I could to the website. A great decision on my part, as this group has come through for me in a spectacular fashion. Although not complete, as ongoing tweaking by me, with their assistance, to optimize content, add blog material, etc., datapro.la has a much more professional look and feel, and more importantly, has added what it takes to drive traffic to the website. I cannot fully describe how very happy, and confident, I am dealing with this group. I know they have my back, and are very responsive to questions and requests. Stupid cliche, buy you are in good hands with The Final Code. It is a great feeling to know this is true.
    David Goldstein Google review
  • Everyone at The Final Code has been fantastic. I own a small beekeeping company. Almost all of my business comes from people google searching beekeepers, due to the nature of the trade. Initially I hired a company for $1200 who promised they could get me to the top of google. It was one guy working out of a library. He claimed it would be easy. I needed the work done in six months. He informed me that his method was a secret, and that he used hidden back links to boost my website. Eight months and $1200 later I was congratulated on reaching the fifth page on google, and the first page on bing. Not only was I out the $1200, but I also lost a year of revenue. I started taking work from my biggest competitors to get by since my phone was not ringing. They were getting all of the business in the area since my SEO guy failed. They were receiving twenty to fifty calls per day. I was lucky to even get one. In a final desperate move I asked The Final Code for help. The Final Code was very different than the previous company. I walked into their office. They offered no secret back links, no empty promises. They laid out everything they were going to do, and everything I had to do to improve my results. Within two months I had several key words on not only the front page of google, but a few of them were the top search result, and they had reports which allowed me to see all the key words I need to improve upon to continue growing. The difference in my business has been incredible. I went from nearly going bankrupt in December to hiring my first employee in June, and I am completely overwhelmed with business. The Final Code saved my business. I really can't thank them enough. To top it all off Larry and Amber have been a genuine pleasure to work with. I can't recommend them enough.
    Bryan Castro Google review, Jun 30, 2016
  • The Final Code was very patient in trying to fulfill all my requests. Carlo worked with me to set up my website for my tax preparation business and he also provided a good training session to manage my website. I feel confident in using my website and I know I can come to ask Carlo if I have any questions.
    Luis Huapaya Google review
  • My wife and I operate a company in Ventura County which provides assorted janitorial and commercial cleaning services. We contacted The Final Code because we had several existing websites and various online listings ran by several different people. Our online presence was a mess and were paying a web company for services we couldn't necessarily verify, we couldn't manage our own website if we wanted, we weren't sure if people were visiting our site and it wasn't a great feeling. We met with The Final Code to help us tie up all of those loose ends, built a new website for our company to attract more users to help generate more business. Thankfully, The Final Code was understanding and was able to work within our budget. We now have these issues resolved and the new site is climbing the Google rankings weekly and is now a page one on several main search terms. We received a lot of of valuable advice on SEO, search engine optimization, and they continue to work with us to progress upward in our online presence. I appreciate that The Final Code staff has been so patient and they are always available whenever we have questions or concerns. They have also trained us on how to update and edit our site so that we are free to make changes when necessary. One of the best parts of working with them is that I'm able to walk into their office and know I will be taken care of. This year The Final Code is building several new websites for separate organizations of ours and we're excited to continue collaborating with The Final Code! Thanks everybody for making our company online presence successful and helping to increase business
    Ken Duff Google review
  • Through my experience, web marketing companies are like used car salesmen... Thousands to choose from, difficult to trust, and are filled with empty promises. The Final Code is exactly the OPPOSITE! Larry, James, and Carlo are always fantastic to work with and know their business inside and out. From SEO to web marketing tactics, I trust them completely with the online presence of my company. They take their time to personally make sure that I am happy with their service and provide REAL statistics (not just Google analytics) behind any changes made to our site They provide valuable insight and ideas on how to grow your online presence and then can execute those ideas immediately (or train you on how to make changes yourself)!. The interface that accompanies their service is easy to use and gives you access to change / update anything that you would ever want to. I highly recommend The Final Code for any of your SEO / Web Marketing needs.
    Justin Engelbach Google review
  • Larry and the team at The Final Code in Ventura literally breathed life back into my business. At the time I hired The Final Code, I had invested thousands of dollars in ongoing website “optimization” with another company. Despite that effort, my law office website was nowhere to be found when it came to the core of my practice – potential clients searching for either criminal defense attorneys or DUI attorneys in my local area. As soon as The Final Code took over care of my website applying their innovative approach, I experienced a dramatic increase in the number of calls I received for DUI and all other criminal cases. I not only skyrocketed to the very top of DUI searches, I have maintained a consistent, top-ranked placement over the last six months. The Final Code team has a passion for helping clients that is evident in all they do. Larry, Carlo, James and team were always at the top of their game and, I felt, sincerely committed to helping me achieve real results. They went out of their way at all points to help me through the process, to aggressively make results-oriented changes, and to communicate with me in a way that made me feel valued as a client. Most importantly to me as a client, everyone at The Final Code conveyed to me that they truly cared about the welfare of my business and did so in an ongoing way. Recognizing the ever changing nature of internet marketing, the team at The Final Code has gone out of their way to keep my website fresh and at the top through expert monitoring and continual innovation. In the website business, the professionals at The Final Code are people of honor and that’s saying a lot. I whole-heartedly recommend The Final Code. You can trust the team to get you the results you want and to do so with dedication and integrity.
    Jennifer Zide Google review