Adding schema to a website is a small amount of code and a larger amount of getting the details right. The code goes in a script tag on your pages, it has to match what visitors can see, and you confirm it with two free tools. Here's the mechanical part, start to finish, once you already know which type to use.
If you haven't picked your specific business type yet, start with LocalBusiness schema for contractors: which type to use, which covers the type list. If you're still fuzzy on what schema is in the first place, what is schema markup is the plain-English version. This article picks up from there and walks through the build, the placement, the testing and the upkeep.
Where the code actually goes
Google recommends JSON-LD over the older microdata and RDFa formats, and it's a single self-contained block: a <script type="application/ld+json"> tag that can sit in the page's <head> or anywhere in its <body>. It doesn't need to be woven into your visible HTML the way older formats did. A page can carry more than one of these blocks; a services page, for instance, might have one for Service and a separate one for BreadcrumbList.
That separation is the reason JSON-LD is easier to live with. You can add, edit or remove it without touching the design of the page. It also means that whoever maintains your site can update it in one place, rather than hunting through the visible content for scattered attributes.
What a finished block looks like
Here is a trimmed example for a made-up plumbing company. Every value is a placeholder, and you would replace each one with your own real details:
`` <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Plumber", "name": "Example Plumbing Co.", "url": "https://www.example.com/", "telephone": "+1-555-555-0100", "image": "https://www.example.com/images/truck.jpg", "address": { "@type": "PostalAddress", "streetAddress": "100 Main Street", "addressLocality": "Anytown", "addressRegion": "ST", "postalCode": "00000", "addressCountry": "US" }, "openingHoursSpecification": [{ "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday","Tuesday","Wednesday","Thursday","Friday"], "opens": "07:00", "closes": "17:00" }], "sameAs": [ "https://www.facebook.com/examplepage" ] } </script> ``
A few notes on reading that. The @type should be the most specific type that honestly fits, which is why it says Plumber and not LocalBusiness. The phone number is written in international format, which is the safest way to avoid ambiguity. The hours use 24-hour time. The sameAs list points to other profiles that are genuinely yours. And every comma and bracket matters: one missing comma makes the whole block unreadable, which is why testing comes later in this article.
The one rule that causes the most problems
Google's structured data guidelines are direct about this: "Don't mark up content that is not visible to readers of the page." Whatever your schema claims, your visible page has to say the same thing. If your JSON-LD lists a phone number, that number should also appear somewhere a visitor can actually see it. This is the single most common way schema goes wrong, not a typo in the code, but a fact in the markup that doesn't match the page around it.
The mismatch usually happens quietly. Someone updates the phone number in the page footer and forgets the script block in the template. Someone adds Saturday hours to the Google profile but not to the markup. Neither change looks like a mistake from where the person was standing, because each of them fixed the thing they could see.
A basic checklist for adding it
- Pick the specific type for your trade, not generic
LocalBusiness. - Include
nameandaddress, which Google lists as the only two properties that are strictly required. - Add what you can verify is accurate:
telephone,openingHoursSpecification,url. Google notes that if you include aurl, it "must be a working link." - Match it to your Google Business Profile. Same hours, same phone number, same address (or hidden address, if you're a service-area business).
- Place the script tag in the head or body of every page where it applies, most often the homepage and contact page for business-level information.
Choosing which properties to include
Required is the floor, not the goal. The properties worth adding are the ones you can keep accurate without effort:
telephone. Use the same number customers see on the page. If you use a tracking number on the site for ads, think about which number should be the public face of the business, and use that one consistently everywhere. NAP consistency: why it matters explains why a second number can cause trouble.openingHoursSpecification. Include it only if you keep set hours. A business that is open "by appointment" or 24 hours for emergencies can say so on the page, and the markup should say the same thing rather than inventing a schedule.imageandlogo. Point these at real files on your own site. A recognizable photo of the business, the truck or the team is better than a stock image.sameAs. A list of profiles that are definitely you: your Google Business Profile, Facebook page, and any industry listing you control. This helps connect the business on your site to the same business elsewhere. Only list profiles that exist and are accurate.areaServed. For a service business, this describes where you work. Use real place names you actually serve, and make them consistent with what your service-area pages say.priceRange. Skip it unless you can state something true and useful. A vague symbol adds nothing.
What to leave out matters just as much. Don't add review ratings you typed in yourself, and don't add awards or certifications you can't point to on the page. Google has its own guidelines about review markup, and marking up ratings that aren't backed by genuine, visible reviews is exactly the kind of thing that creates problems.
A special note for service-area businesses
Many trades work at customers' homes and don't want a public shop address. On the Google profile you can hide the address, which is covered in how to fully optimize a Google Business Profile. Your schema needs a matching approach. The rule of visible content still applies, so don't publish a street address in markup that you hide everywhere else on the page and the profile. If your address isn't public, check the current Google guidance on service-area businesses and decide what to include, with the business name, phone and service areas carrying the weight. This is a judgment call worth making deliberately, not by copying a template that assumes a storefront.
How to test it before you trust it
Don't assume the code works just because it validates. Two free tools check different things:
- Google's Rich Results Test checks whether your markup is eligible for the specific rich result features Google currently supports. Not every schema type has a visible rich result; a
LocalBusinessblock might validate correctly without producing anything visually different in search results, and that's expected. The walkthrough in how to test your schema with the Rich Results Test shows what the output means. - Search Console's structured data reports show what Google has actually detected and parsed on your live, crawled pages over time, which is a better long-term check than a one-time test on a single URL.
A sensible testing routine has three steps. First, paste the code into a validator before it goes live, so syntax errors surface early. Second, test the live URL after publishing, because some site builders and plugins change the code on the way out. Third, view the page source in your browser and search for ld+json to confirm that the block is really there and appears once, not three times because a plugin and a theme both added it.
Common mistakes that break it
- Copying a template without editing every field. Leftover placeholder names, phone numbers and addresses from the example you copied are surprisingly common.
- Duplicate blocks. An SEO plugin generates one, the theme adds another, and a developer pastes a third. Conflicting versions of the same facts are worse than one clean block.
- Curly quotes. If you paste code through a word processor, straight quotes can turn into curly ones and the block stops parsing. Edit it in a plain text editor.
- Hidden or mismatched content. Markup that describes a service you don't list on the page, or hours that differ from what visitors see.
- Wrong type. Using a type that sounds right but doesn't describe your work. A roofer marked up as a generic store sends a weaker signal than a type chosen for the trade.
What happens if something's wrong
If your structured data violates Google's guidelines, most commonly by not matching the visible page, the consequence is a manual action, and it's narrower than people expect: Google's own documentation states that "a structured data manual action means that a page loses eligibility for appearance as a rich result; it doesn't affect how the page ranks in Google web search." A schema mistake costs you a feature, not your ranking. That's a reason to fix it, not a reason to panic if you find one.
Keep it current
Schema isn't something you add once and forget. If your hours change, your schema needs to change with them, on the same day. A block of code that still claims your old hours a year later is worse than no schema at all, since it's an inaccurate factual claim search engines and AI assistants can check against your Google Business Profile and notice the mismatch. How to get your business recommended by AI assistants covers why that kind of mismatch costs you more now than it used to.
Build the upkeep into things you already do. When you change hours for the holidays, the checklist is: the Google profile, the contact page, the footer, and the schema block. When you change your phone number, the same four places. A short note in a shared file titled "where our business facts live" saves you from forgetting one.
How to check your work in ten minutes
Run through this once after adding the code and again every few months:
- Open your homepage and contact page and compare every fact in the markup to what a visitor sees.
- Run both URLs through the Rich Results Test and read any warnings, not just errors.
- Open your Google Business Profile and compare hours, phone and address to the markup.
- Check Search Console for structured data reports that show errors or warnings on the pages you care about.
- View the source of one page and confirm the block appears once.
Warnings are not failures. Many are about optional fields. Errors are what to fix first.
What this means for your business
Schema is worth adding because it's cheap and it states your basic facts in a form machines can read. Choose the specific type, include only what's true and visible, put it on the homepage and contact page, test it, and then make updating it part of every change to your hours or phone number. If you'd rather not do it by hand, ask whoever manages your site to show you the live block and to confirm that it matches your Google profile today.
Questions
Do I need a different script tag on every page?
Business-level information (name, address, hours) is usually enough once, on the homepage and contact page. Individual service pages are better served by adding Service schema specific to that page, as described in service schema: how to mark up each service.
Will adding schema improve my ranking?
Not directly. It helps search engines and AI assistants understand your pages accurately, which supports everything else you're doing, but it isn't a ranking factor on its own.
How do I know if my schema is already broken?
Run a page through the Rich Results Test, and check Search Console's structured data reports for any pages Google has flagged.
Can I add schema without touching code?
Often, yes. Many website platforms and SEO plugins have a field for business details that generates the block for you. The risk is that the plugin's output may use a generic type or fill in details you didn't intend, so look at the generated code on your live page and confirm it says what you want.
Should I put a review rating in my LocalBusiness schema?
Only if the rating comes from genuine reviews that are visible on that page and meet Google's current rules for review markup. Typing in an average yourself is the kind of thing that creates problems. If you're unsure, leave it out and let your Google profile carry the ratings.
What if my business has more than one location?
Each location should have its own page with its own markup, using that location's address, phone and hours. Don't combine them into one block with several addresses. One Google Business Profile or several locations explains when separate locations make sense.
How long until Google notices new schema?
It depends on how often your pages are crawled, which can be days or weeks. You can speed it up by requesting indexing of the page in Search Console, but there's no need to keep resubmitting. If the Rich Results Test reads it correctly, the markup is fine.



