Transcript se seedha practical knowledge. JSON-LD likhna, validate karna, nest karna, entity relationships banana, aur advanced semantic triples — step by step, real code ke saath.
Schema markup 3 formats mein likha ja sakta hai. Lekin decision ek second mein hota hai:
HTML se bilkul alag. <script> tag mein. Google officially recommend karta hai. Easy to maintain. Page ke <head> mein rakho — search engine HTML parse karne se pehle padh leta hai.
HTML tags ke andar mix hoti hai. itemscope, itemtype, itemprop attributes use karta hai. HTML clutter hoti hai, maintain karna mushkil.
Microdata jaisa — HTML ke andar wrap hota hai. Different vocabulary (vocab, typeof, property). Academic sites ke liye theek hai, regular SEO mein zaroorat nahi.
<head> section mein hone se crawl budget bhi bachta hai.
<script type="application/ld+json"> { "@context": "https://schema.org", // vocabulary source — hamesha yahi "@type": "Organization", // entity type — Capital letter se shuru "name": "Sunrise Bakery" // property — small letter se shuru } </script>
OrganizationPersonProductLocalBusinessPostalAddress
nameaddresscontactPointopeningHoursaggregateRating
Ye rule todte ho → algorithms confuse hote hain. Parsing errors aate hain. Always follow karo.
Schema likhne se pehle ye samjho: is page ka macro context kya hai? Kaunsa user intent answer kar raha hai ye page?
Homepage ya About page pe Organization schema lagao. Ye aapki entity ki basic identity declare karta hai knowledge graph mein:
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "name": "Sunrise Bakery", "url": "https://sunrisebakery.com", "logo": "https://sunrisebakery.com/logo.png", "contactPoint": { "@type": "ContactPoint", // nested schema type "telephone": "+92-300-1234567", "contactType": "customer service" } } </script>
Important Properties
| Property | Status |
|---|---|
name | Required |
url | Recommended |
logo | Recommended |
contactPoint | Recommended |
sameAs | Optional |
foundingDate | Optional |
numberOfEmployees | Optional |
serviceArea → ab areaServed. Hamesha new property use karo.
Agar aapka business kisi specific location pe serve karta hai — LocalBusiness schema use karo. Address, coordinates aur opening hours zaroori hain:
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Sunrise Bakery",
"address": {
"@type": "PostalAddress", // nested type for address
"streetAddress": "123 Main Street",
"addressLocality": "Springfield", // city
"addressRegion": "IL", // state/province
"postalCode": "62701",
"addressCountry": "US"
},
"geo": {
"@type": "GeoCoordinates", // exact location on map
"latitude": 39.7817,
"longitude": -89.6501
},
"openingHours": "Mo-Fr 09:00-18:00", // when to visit
"telephone": "+1-555-123-4567"
}
Schema likha? Hamesha dono tools se validate karo pehle publish karne se:
Official tool. Code snippet ya URL paste karo. Format errors, missing brackets, wrong commas — sab catch karta hai. Fast response milti hai.
validator.schema.org
Rich snippets ke liye kaun se properties zaroori hain — ye batata hai. Critical issues aur warnings alag alag show hoti hain. Live URL ya code dono se test karo.
search.google.com/test/rich-results
⚠️ Comma Missing hone pe error:
3 cheezein jo sabse zyada parsing errors deti hain:
"..." zaroori{ } aur array ke liye [ ] — balance hona chahiyeHar blog post ya written content pe Article schema lagao. Author, publisher, aur dates clearly declare karo:
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Apple announces iPhone SE",
"description": "New iPhone announced at 11:30 in California",
"image": "https://example.com/images/iphone-se.jpg",
"datePublished": "2024-03-15",
"dateModified": "2024-03-16",
"author": {
"@type": "Person", // nested — person entity
"name": "Emily Rodriguez",
"url": "https://sunrisebakery.com/authors/emily"
},
"publisher": {
"@type": "Organization", // nested — organization entity
"name": "Sunrise Bakery",
"logo": {
"@type": "ImageObject", // logo bhi nested type
"url": "https://sunrisebakery.com/logo.png"
}
},
"about": {
"@type": "Event", // article kis event ke baare mein hai
"name": "Apple's March Event"
}
}
Article ke specific subtypes:
Product schema schema.org ka sab se prominent type hai kyunke Google rich snippets (price, availability, ratings) sirf isi se show karta hai:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Artisan Sourdough Loaf",
"image": "https://sunrisebakery.com/products/sourdough.jpg",
"description": "Handcrafted sourdough bread baked fresh daily",
"brand": {
"@type": "Organization",
"name": "Sunrise Bakery"
},
"offers": {
"@type": "Offer", // price info nested
"price": "8.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"url": "https://sunrisebakery.com/products/sourdough"
},
"aggregateRating": {
"@type": "AggregateRating", // overall rating
"ratingValue": "4.8",
"reviewCount": "127"
}
}
price property missing ho — Critical Issue aati hai. Merchant listings rich result nahi dikhta bina price ke. Ye required property hai product ke merchant listing feature ke liye.
schema.org/InStockschema.org/OutOfStockschema.org/PreOrderschema.org/Discontinued
sku — stock unit numbergtin — global trade itemcolor — product colorisVariantOf — parent product
Breadcrumb schema search engine ko batata hai ke ye page site ke kin sections mein hai. SERP mein URL ke bajaye breadcrumb path dikhta hai:
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [ // array bracket — multiple items
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://sunrisebakery.com"
},
{
"@type": "ListItem",
"position": 2,
"name": "Products",
"item": "https://sunrisebakery.com/products"
},
{
"@type": "ListItem",
"position": 3,
"name": "Sourdough Bread",
"item": "https://sunrisebakery.com/products/sourdough"
}
]
}
[ ] (square bracket) use karo. Single nested type ke liye { } (curly bracket). Ye difference samajh lo — breadcrumbs, reviews, multiple offers sab mein array chahiye.
FAQ schema search engine ko target audience ke questions convey karta hai. Direct search result mein accordion format mein questions show ho sakte hain:
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "WebHostingPK ka cheapest plan kya hai?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Basic plan sirf PKR 499/month se start hota hai — NVMe SSD, free SSL, aur 24/7 support ke saath."
}
},
{
"@type": "Question",
"name": "Kya local support available hai?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Haan, 24/7 Urdu aur English mein live chat aur phone support available hai."
}
}
]
}
Advanced implementation mein ek page pe multiple schema types combine karte hain. Product page pe Product + Review + Offer sab saath:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Artisan Sourdough Loaf",
"brand": {
"@type": "Organization", // nested type #1
"name": "Sunrise Bakery"
},
"aggregateRating": {
"@type": "AggregateRating", // nested type #2
"ratingValue": "4.8",
"reviewCount": "127"
},
"review": {
"@type": "Review", // nested type #3
"datePublished": "2024-01-15",
"reviewBody": "Best sourdough I have ever tasted!",
"author": {
"@type": "Person", // nested type inside nested type
"name": "Ahmed Khan"
},
"reviewRating": {
"@type": "Rating",
"ratingValue": "5"
}
},
"offers": {
"@type": "Offer",
"price": "8.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
}
@id ek unique identifier hai jo ek entity ko repeatedly reference karne deta hai — bina poora schema dobara likhne ke. Internal linking of schema:
{
"@context": "https://schema.org",
"@graph": [ // multiple entities ek saath
{
"@type": "Organization",
"@id": "https://sunrisebakery.com/#organization", // unique ID
"name": "Sunrise Bakery",
"url": "https://sunrisebakery.com"
},
{
"@type": "Article",
"name": "Best Sourdough Recipe",
"publisher": {
"@id": "https://sunrisebakery.com/#organization"
// poora organization dobara likhne ki zaroorat nahi
// sirf ID se reference karo — machine connect kar leti hai
}
},
{
"@type": "Product",
"name": "Sourdough Loaf",
"brand": {
"@id": "https://sunrisebakery.com/#organization"
// same organization — same ID — machines ek unit samjhti hain
}
}
]
}
#section-1 ek page ke kisi section se link karta hai — waise hi schema mein @id ek entity se doosri jagah link karta hai. Machines is ID ko dekh ke poori entity samajh leti hain bina repeat kiye.
Multiple locations ya departments wali organizations ke liye — hierarchical relationships:
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Sunrise Bakery — Lahore Branch",
"parentOrganization": { // main HQ se connect karo
"@type": "Organization",
"name": "Sunrise Bakery Group",
"url": "https://sunrisebakery.com"
}
}
Schema markup ki har property ek Semantic Triple banati hai: Subject → Predicate → Object. Ye Google ke "Knowledge Based Trust" research paper ka core concept hai — information ka ye format quality metric hai:
Sochne ka tariqa change karo — schema likhte waqt poocho:
sameAs property entity disambiguation ke liye sabse powerful tool hai. Search engine ko bata do: "ye entity jo main describe kar raha hoon — ye wahi entity hai jo in platforms pe exist karti hai":
{
"@context": "https://schema.org",
"@type": "Person",
"@id": "https://sunrisebakery.com/#founder",
"name": "Maria Santos",
"jobTitle": "Founder & Head Baker",
"sameAs": [ // array — multiple external profiles
"https://www.linkedin.com/in/mariasantos-baker",
"https://twitter.com/mariasantos_bakes",
"https://www.wikidata.org/wiki/Q123456789",
"https://en.wikipedia.org/wiki/Maria_Santos"
]
}
sameAs se aap search engine ko prove karte ho: is Maria Santos ka LinkedIn ye hai, Wikipedia ye hai, Wikidata ye hai — ab Google confuse nahi hoga. Ye knowledge panel appearance ke liye bhi important hai.
Agar organization ka naam "Sunrise Bakery" hai — har page ke schema mein same naam rakho. Ek jagah "Sunrise Bakery Pvt Ltd" aur doosri jagah "Sunrise Bakery" — dono alag entities ban jaati hain machines ke liye.
Jo information page pe visible nahi — schema mein mat daalo. Google explicitly kehta hai: hidden content ka schema markup = policy violation. Penalty aa sakti hai.
Airline ke liye Organization mat use karo — Airline use karo. Restaurant ke liye FoodEstablishment ya Restaurant. Generic types se specific types zyada context dete hain.
Price change hui? Phone number change hua? Schema bhi update karo. Backend aur frontend mismatch = misleading content = Google warning.
Ek baar mein sab kuch mat karo. Pehle homepage Organization schema. Phir blog posts mein Article. Phir product pages. Phir FAQ. Phir advanced — @id, @graph, sameAs.
"Enhancements" section mein schema errors aur warnings milti hain. Monthly check karo. Rich results kitne pages pe show ho rahe hain — track karo.
Sirf woh schema types aur properties cover karta hai jinke liye rich results show hote hain. Zyada practical — CTR boost, merchant listings, review stars, FAQ accordion.
developers.google.com/search/docs/appearance/structured-data
Complete vocabulary — 800+ properties, 1000+ types. Google documentation mein jo nahi hai woh sab yahaan milega. Semantic SEO ke liye non-rich-result properties bhi equally important hain.
schema.org
"Microsoft uses schema markup to help its LLMs like those powering Copilot understand web content. The structured data integration is crucial for enhancing search visibility, generating rich search features and improving the accuracy of AI-driven responses."
Format choose karna se leke semantic triples optimize karne tak — schema markup ka poora practical safar. Ab implement karo, validate karo, aur monitor karo.